javascript - flashObject 'is not a function' error only in Firefox -


I have a page with a flash chart to display. First of all, I call a separate AJAX call to capture chart data, and then process it on Javascript and I call the Flash object function like this:

  var flashObj = YAHOO.util.Dom.get (chartContainer); If (! YAHOO.env.ua.ie) {Flash obz = Flash objegés.jpgByTagname ("Embed") [0]; } Flash Obze .Setting Options (datax.xml.xml); FlashObj.SetAndParseData (dataXml.xml); FlashObj.Draw ();  

However, I get an error in Firefox "flashObj.SetSettingOption is not a function". I did not get it in IE8. Is it because the Flash object is not fully loaded? But then on the post-page tour, the flash object should be cached, but the same error appears.

Edit: Also part of html here

  & lt; Object classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" id = "mychart" width = "760" height = "455" codebase = "http://fpdownload.macromedia.com/get/flashplayer/current/ Swflash.cab "& gt; & Lt; Param name = "movie" value = "../ flash / mychart.swf" /> & Lt; Param name = "quality" value = "high" /> & Lt; Param name = "bgcolor" value = "#ffffff" /> & Lt; Param name = "allowScriptAccess" value = "wahid" /> & Lt; Param name = "wmode" value = "transparent" /> & Lt; Embed src = "../ flash / migrate.swf" quality = "high" bgcolor = "#ffffff" width = "760" wmode = "transparent" height = "455" align = "middle" play = "true" loop = "False" permissions = "wahd" type = "app / x-shock wave-flash" plugins page = "http://www.adobe.com/go/getflashplayer" & gt; & Lt; / Embed & gt; & Lt; / Object & gt;  

Thanks in advance for any help!

Is this because the Flash object is not fully loaded?

Yes, which are often with Flash.

But then the Flash object should be cached on the visit to the page, but the same error appears.

Probably no flash object needs to be set up to its external interface. It takes some time, no matter if the .swf file is cached or not.

Usually this action is solved using a callback function in the script, something like

  ExternalInterface .call ('flashLoaded');  

or similar.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -