using SWFObject to reload a swf.

544 views
Skip to first unread message

Qbert

unread,
Jul 22, 2008, 11:03:47 PM7/22/08
to SWFObject
Is there a way to replay a SWF loaded in swfobject.embedSWF?

I'm trying to get a SWF file to loop, but the SWF file has quit
command, normally I would just reload the SWF file when a user clicks
on a link that triggers a javascript, but this version of swfObject
doesn't appear to like this.

Aran Rhee

unread,
Jul 22, 2008, 11:42:14 PM7/22/08
to swfo...@googlegroups.com
So you don't have access to the original file?

You might be able to use the old-school FSCommand / javascript methods:

http://www.moock.org/webdesign/flash/fscommand/index.html#diagram2

Other than that, you could just re-load the swf if it starts to play
automatically.


Cheers,
Aran

Jean Meslie

unread,
Jul 31, 2008, 4:36:21 PM7/31/08
to SWFObject
You could do this by , to embedding the <div> tag that is passed as a
parameter to the SWFObject.embedSWF call within another div tag.
Then before I call the SWFObject.embedSWF method, I replace the
innerHTML of the parent tag with a well known value, so every time the
SWFObject.embedSWF() method will find the <div> element in the same
manner it found the first time.

I used this method for changing the movie based on user's activity.
The procedure is explained in the blog post
http://meslie.blogspot.com/2008/07/reload-swfobject-with-different-flv.html
Reply all
Reply to author
Forward
0 new messages