PDA

View Full Version : buttons in a movieclip


sketchie
09-11-2005, 06:18 PM
Why can't you use buttons in a movieclip to navigate a site? It's driving me crazy! I need my buttons to slide out and then redirect & I'd like to have this in a movieclip so that I don't have to repeat the same buttons in each section. Does that make sense? Can anyone help?

Thanks!!

oldnewbie
09-11-2005, 07:26 PM
But you can... You just have to do it properly.

Do you have button handlers on the movie clip itself?

Where do you want to navigate to? The main timeline? In another scene? in another movie clip?

It would be better if you attached an example .fla, zipped up and in a MX only format...

You'd have a better chance of getting an answer if your .fla was in a MX only format (not MX2004), and zipped up.

You would have to save a copy of your MX2004 .fla, (using Save as...) and changing the Document type to MX only in the Save as... window.

sketchie
09-12-2005, 12:15 AM
I don't have a sample that I can post right now, but it's a problem I've run into a couple of times. When I took my Flash course the instructor didn't get it either. :o

I want the buttons to go to and play another scene and a specific label in that scene. I've used the basic GoToAndPlay but it isn't working for me. The problem is that I will have multiple buttons sliding down from multiple options so if I don't have this in a movie clip I will have to repeat them over and over again in each section.

oldnewbie
09-12-2005, 01:30 AM
If you don't have button handler events on the movie clip itself, your nested buttons should work... But you should never target scene names in your Flash life again. Only target labeled frames. Thing is that from within a movie clip, you need to add the targeted timeline to your buttons' scripts...

Thus if you're targeting frame 1 of a scene 4, which was labeled with the label scene_4 (for example...)...

on(release){
_level0.gotoAndPlay("scene_4");
}

If your movie clip is only one level up from the main timeline, you can also use _parent instead of _level0...

on(release){
_parent.gotoAndPlay("scene_4");
}

sketchie
09-12-2005, 04:08 AM
Thanks a lot - it works better. I didn't know you had to indicate a level.

Do you know if there is a way to stop the buttons from going to the next label if you double-click?

Thanks again for your help!