Advertisement Jump to content
Sign in to follow this  

[web] JavaScript to Flash - goto scene and play?

This topic is 4950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to use javascript to communicate with a swf movie to tell it to goto and play a particular scene. Now I've know about flash.GotoFrame(n) but I need it goto a particular scene Is this possible or do I need a one scene movie? The following code shows what I'm trying to do...
<script language="JavaScript" type="text/JavaScript">
// jumps to flash frame
function jumpToEmail()
	var flash = MM_findObj("flash");  // get flash object	
	flash.gotoAndStop("Email",[1]);     // this doesn't work but you get the idea

(the flash object is being found ok) [Edited by - Kristafarii on June 30, 2005 12:09:58 AM]

Share this post

Link to post
Share on other sites
I haven't had a reply on this all day so here's a bit more info about what I'm trying to do.

If you visit my website and offer me a job on the Gold Coast - Australia I'll be very happy :)

but seriously...

If you go to my website you'll see I have the page split into 2 frames with a flash navigation bar at the top.

The Nav bar displays what page is showing in the lower frame. This works fine as long as you use the nav bar, however if you use the browser's back or forward buttona, or use a link in the lower frame then the nav bar doesn't change and so doesn't reflect the current page.

This is why I need to tell the nav bar to goto a particular scene (each scene is for a different page). I really don't want to radically change the way the nav bar works because it's an intricate little beast.

Share this post

Link to post
Share on other sites
Problem solved..
use flash.GotoFrame(n)
and add together the number of frames in the preceeding scenes.

If each scene is say 100 frames and you want to goto frame 3
then n = 200.


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!