Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Buttons - jump to frame... 1

Status
Not open for further replies.

flasher

Technical User
Mar 4, 2002
245
US
I have 3 buttons on my site. Each one jumps to a frame with a movie clip in it. That part works. My problem is: once the button has already jumped to the right frame, how do you deactivate that button so that when clicked again (once it's already at it destination frame) it shouldn't jump to another frame or leave the screen blank... funny things are happening when i click the button twice... thanks in advance.
 
So all 3 buttons allways appear in every frame?

Regards,
new.gif
 
Well... It would be better for me to check your .fla, but you can try the following:

On the first frame of your movie, set a variable, something like:
_root.current_selection = "";

And then modify the script on your first button somewhat like this:

on(press){
if (_root.current_selection == "first") {
stop();
} else {
gotoAndStop(x); // x being the targeted frame
_root.current_selection = "first";
}
}

On the second button...

on(press){
if (_root.current_selection == "second") {
stop();
} else {
gotoAndStop(x); // x being the targeted frame
_root.current_selection = "second";
}
}

Etc... Etc... For all your buttons on all frames.

You can change "first" and "second" by whatever you like, like "news", "info", "contact" etc... Maybe better describing the frames the user ends up on.

Voilà!

Regards,

If you can't get it to work, e-mail me your .fla, at oldnewbie@hotmail.com, I'll insert the coding, and send it back to ya!
new.gif
 
I tried to zip and email you my fla but for some reason it's not zipping properly and it won't send. I'll have to try to figure out the code myself. I'm not much of a programmer so wish me luck.. thanx for taking the time to write it all out!
 
Can't you just upload it to your site, and e-mail me a link to it?

Regards,
new.gif
 
I don't have where to upload my site yet. I didn't want to buy a hosting package until my site is ready and I have something to put there!
 
That was a BIG help! I've been looking for a long time for for free space that works... Now that I've uploaded my site, I can upload the fla to the server but how do you get it? what do you mean by sending you a link? a link to what? sorry, I never did this b/4.
 
Well you now have an address, something like
right?

Then, if you can manage it, zip up your .fla, and upload your zipped file to your site.

Then I would get it by simply typing the link:

Of course that's my address, you would have to give me your's!

If you can't zip it up, you can try to upload the .fla itself, but that doesn't allways work.
Try this to see, if you can download this one from my space:


Regards,
new.gif
 
ok, so I uploaded the fla straight. It should download.
 
Still need a link!
Don't know the address of your site, nor your .fla's name!

regards,
new.gif
 
16.4 MGS! For anyone else who's tempted by this!
Downloading now!

Regards
new.gif
 
I've zipped files b/4 but I just can't seem to do it today, try as I might. It's just not working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top