Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
virtualight  
View profile  
 More options Nov 17 2009, 2:36 pm
From: virtualight <petk...@virtualight.com>
Date: Tue, 17 Nov 2009 11:36:25 -0800 (PST)
Local: Tues, Nov 17 2009 2:36 pm
Subject: Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown
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/as3wrapp...
-- uses dynamic publishing, leading me to believe that dynamic
publishing is the only way to go.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
virtualight  
View profile  
 More options Nov 17 2009, 4:59 pm
From: virtualight <petk...@virtualight.com>
Date: Tue, 17 Nov 2009 13:59:40 -0800 (PST)
Local: Tues, Nov 17 2009 4:59 pm
Subject: Re: Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown
Boy, I thought I had the answer when I found swfobject.addDomLoadEvent
(functionName)

This calls functionName when the dom of the page is available, which I
thought would be after SWFObject has swapped out the DIV for the
Flash. I had been calling my Flash function during window.onload, but
addDomLoadEvent still doesn't work. I think now I'll just cheat and
throw in a setTimeout and see if the loading delay is really the
culprit or if it's a security issue.

Jennifer

On Nov 17, 12:36 pm, virtualight <petk...@virtualight.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aran Rhee  
View profile  
 More options Nov 17 2009, 6:17 pm
From: Aran Rhee <aran.r...@gmail.com>
Date: Wed, 18 Nov 2009 10:17:02 +1100
Local: Tues, Nov 17 2009 6:17 pm
Subject: Re: Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown

Hi Jennifer.

addDomLoadEvent() is not fired after the swf is embedded, but when the DOM
is available (ie you can get to all of the elements on your page). You can
use this function to delay the embedding of your Flash file or run some
other function after the page elements are available. SWFObject inteternally
uses the domReady event to init all of its own proceses.

Perhaps you want to look at the callback function (the last param on both
the static and dynamic publishing methods) if you need to ensure the swf has
been written to the page before calling something else.

There are some people on this list who have intimate knowledge of the
Youtube API, so I am hopeful they can sort out your issue.

Cheers,
Aran

On Wed, Nov 18, 2009 at 8:59 AM, virtualight <petk...@virtualight.com>wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jennifer Petkus  
View profile  
 More options Nov 17 2009, 6:24 pm
From: Jennifer Petkus <petk...@virtualight.com>
Date: Tue, 17 Nov 2009 16:24:02 -0700
Local: Tues, Nov 17 2009 6:24 pm
Subject: Re: Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown
Thanks, Aran. I see what you mean about addDomLoadEvent. Further  
investigation makes it clear to me that when using dynamic publishing,  
my drag bar swf is not loading at all. It seems that the Loader.load()  
is not being fired at all, so I'm not getting an error AND it's why  
I'm getting the #1009 error.

Adding a timeout did get around the div not found error and I'll  
implement a more elegant solution later.

Jennifer

On Nov 17, 2009, at 4:17 PM, Aran Rhee wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
virtualight  
View profile  
 More options Nov 17 2009, 6:32 pm
From: virtualight <petk...@virtualight.com>
Date: Tue, 17 Nov 2009 15:32:44 -0800 (PST)
Local: Tues, Nov 17 2009 6:32 pm
Subject: Re: Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown
It looks like I'm suffering from a comedy of errors. I confirmed that
my drag bar component was not loading, which seems to have been a
consequence of my flashvars being ignored (I must have a typo
somewhere). Because one of the stage.loaderInfo.parameters was
missing, the if () statement prevented a call to load the drag bar.
Because the load was never called, the subsequent call from JavaScript
generated the #1009 error, further obfuscated by the
"document.getElementById("viewerMovie").resetDragBarJS(flashheight) is
not a function" error caused by the extra delay inherent in the
dynamic publishing method.

So I have to figure out why my flashvar is missing, and I think most
of problems are solved (well, for today anyway).

Jennifer


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
virtualight  
View profile  
 More options Nov 17 2009, 7:12 pm
From: virtualight <petk...@virtualight.com>
Date: Tue, 17 Nov 2009 16:12:10 -0800 (PST)
Local: Tues, Nov 17 2009 7:12 pm
Subject: Re: Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown
IT WAS A TYPO! The difference between flashvars.loadobject = "?ti,e1"
and flashvars.loadobjects = "?ti,e1". A lousy letter "s". Two misspent
days. Argh! D'oh! Baka tari!

I apologize for wasting everyones time but thank you for listening.

Jennifer

PS So now http://www.cuculcan.com/ works for Firefox without any
errors, but definitely dynamic publishing is necessary to get those
YouTube videos to play.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aran Rhee  
View profile  
 More options Nov 17 2009, 7:25 pm
From: Aran Rhee <aran.r...@gmail.com>
Date: Wed, 18 Nov 2009 11:25:23 +1100
Local: Tues, Nov 17 2009 7:25 pm
Subject: Re: Firefox, SWFObject and ActionScript 3.0 Wrapper for Chromeless Player meltdown

I am glad that you got it working (even if you did lose some hair over the
last few days!). Japanese swear words always work for me too :)

BTW - As a general rule of thumb, if there is any other js interaction
happening with the page, it is a good idea to use dynamic publishing. You
have much more control over how and when your swf is created etc.

Cheers,
Aran

On Wed, Nov 18, 2009 at 11:12 AM, virtualight <petk...@virtualight.com>wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google