Is there a way to append a flash embed so that it skips to a specific frame?

Syringer

Lifer
Aug 2, 2001
19,333
2
71
I have a main flash banner for my site along with 10 different pages..and I want to keep the same toolbar but have the images change on each page. Right now I just exported 10 different swfs with a different image on each of them, but was wondering if there was a way to just have one swf file and in the embedding command to skip to a specific frame within the swf?
 

GaryJohnson

Senior member
Jun 2, 2006
940
0
0
If I recall correctly, you can add a query string (like a HTTP GET) to the end of the URL for the SWF like so:

<EMBED src="myflashmovie.swf?skiptoframe=5">

That ends up as the value of: _root.skiptoframe
 

wwswimming

Banned
Jan 21, 2006
3,695
1
0
the command "gotoandplay(5)" comes to mind, that would be for skipping
to frame 5. i would have to get out some old homework.

i don't know how to do it outside the Flash programming environment.

there's probably an exact tutorial for this at
http://www.gotoandlearn.com/
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Like GaryJohnson said you can pass variable values to a SWF using CGI style in the URL or a
< param name='flashvars' value='x=val1&y=val2&z=val3...' > tag in the < object > .

In your ActionScript for the first frame you look for the variable and if found do a gotoandstop or gotoandplay.
 

Syringer

Lifer
Aug 2, 2001
19,333
2
71
Hmm I'm confused..so my flash embed would say:

<param name="movie" value="header.swf?skiptoframe=300" />

And in my actual .swf it would say: gotoAndStop(_root.skiptoframe);

Or how would I modify the embed src?

Edit: Awesome, it worked! Thanks.