Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player
meltdown

I know a lot of postings have mentioned problems with Firefox and
SWFObject and the "Error calling method on NPObject! [plugin
exception: Error in Actionscript. Use a try/catch block to find
error]" message, but I'm adding YouTube videos into the mix as well.

The situation: I've created a website -- http://www.cuculcan.com/ --
that works quite well in Safari and Internet Explorer. I use SWFObject
2.2 to static publish the Flash and I'm using this solution --
http://code.google.com/apis/youtube/articles/youtube_as3_chromeless.html
-- to play YouTube videos. It uses the ExternalInterface.addCallback
method to communicate with the YouTube api.

But Firefox 3.5 won't play the videos unless I switch to dynamic
publishing. Here's an example of the videos playing in Firefox --
http://www.cuculcan.com/viewer.html. Unfortunately, you'll have to
manually search for the Race to the Moon timeline to find a timeline
with a YouTube video in it.

Dynamic publishing, however, causes a problem that affects not just
Firefox. The main Flash movie loads another swf that contains the drag
bar that divides and resizes the Flash content vs the html content.
Both the loader, main viewer and drag bar swfs are all on the root
level of the same domain and all are loaded using the same full path.
However, when using dynamic publishing, I get the "Error calling
method on NPObject!" in both Safari and Firefox, and I've tracked this
down to an ExternalInterface.addCallback that exposes a Flash function
to JavaScript.

That Flash function simply repositions the drag bar swf vertically,
which happens without a hitch under static publishing, but under
dynamic generates a #1009 error. I assume that because of the bait and
switch nature of dynamic publishing, the drag bar hasn't loaded yet.
I'm calling the Flash function (via JavaScript) in the onload handler
for the window, but I'm guessing that's no longer working. And I can't
create an onload handler for a div.

My ultimate solution would be to switch to dynamic publishing and move
the drag bar back into the main swf as a sprite and not a loaded
movie. It's only a 2K swf and would remove any suspicion that's what's
happening is a security issue (my first thought until I confirmed that
everything is referenced by the same domain name) and remove the #1009
error.

My preferred solution would be to find a way to get static publishing,
Firefox and the YouTube video solution to work, so if anyone has a
suggestion how to do that, I'd appreciate it.

Thanks,

Jennifer

PS What is interesting is that this demo of the ActionScript 3.0
Wrapper for Chromeless Player --
http://youtubechromelesswrapper-as3.googlecode.com/svn/trunk/as3wrapper/deploy/index.html
-- uses dynamic publishing, leading me to believe that dynamic
publishing is the only way to go.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to