PDA

View Full Version : i need help with buttons


Developer
10-12-2001, 06:02 AM
Hi, i have made my buttons as a "movie symbols with two key frames for up and down states". How do i attach an action that will tell that movie simbol (my button), that when it is pressed , go to what_ever_Scene you tell it to ??

Thank you.

Jesse
10-12-2001, 02:13 PM
why did you make your button as a movieclip? it's a lot easier to just make it a button symbol...

Developer
10-12-2001, 04:23 PM
I had a problem creating a button, that when you press it and then let go it will maintain down position. In order to do it I had to create movie symbol, with two frames up and down states and some actions to it thanks to "Strok” I believe he is an
Administrator here helped me to solve that problem. Now I can't find info on where and how I need to attach an action in order to go to another Scene. I know how to do it with button symbols, but apparently I can't figure it out how to do it with movie symbol.

Jesse
10-13-2001, 01:14 AM
You'll need to put a frame label ont hef irst frame of your target scene then use this code from the button within the movieclip:
_root.gotoAndPlay("lableName");
that will prolly come within an on (release) handler.

Developer
10-13-2001, 03:31 AM
Inside my movie symbol my first button contains the following code:

on (release) {
_root.b1.gotoAndStop(2);
_root.b2.gotoAndStop(1);
_root.b3.gotoAndStop(1);
_root.b4.gotoAndStop(1);
}

and the second frame of that movie symbol is a down state of the button with "stop" action attached.

The question: where do i put that code:
_root.gotoandPlay(lableName); ??


thank you for taking time to explain.

Jesse
10-13-2001, 03:50 AM
that depends when you want to go to the new scene. if you want to go to the next scene when the button is pressed, put it on the button...

Developer
10-13-2001, 12:46 PM
Jesse thank you very much, it works now !!

Developer
10-13-2001, 04:03 PM
Everything works except for one more things, now when you double press a button it automatically jumps to the next scene and it goes back and forth. When I test scene by scene everything functioning fine. I have tried to put a stop action to the key frames in the movie, but it is still doesn’t work. What do I do wrong??

Developer
10-13-2001, 06:57 PM
I figured out how to change to gotoAndStop :) . What I can't understand is that I have to double click the button in order to switch to down state. I have tried every option: Press, Release, etc. it is still doesn’t work as I want it that on the single click it will go into down state. Please help.

Jesse
10-14-2001, 01:33 AM
Make sure your _root.gotoAndStop comes after the command to go to the down state, else it will go to the new scene and the button wont ever get the command to go to the (fake) down state.

Developer
10-14-2001, 09:25 PM
Please look at my code, it is still not going into down state, i need to press it two times in order to turn into a down state collor.

on (press) {
_root.b1.gotoAndStop(2);
_root.b2.gotoAndStop(1);
_root.b3.gotoAndStop(1);
_root.b4.gotoAndStop(1);
}
on (press) {
_root.gotoAndStop("about");
}

Thanks

Jesse
10-15-2001, 06:00 AM
on (press) {
_root.b1.gotoAndStop(2);
_root.b2.gotoAndStop(1);
_root.b3.gotoAndStop(1);
_root.b4.gotoAndStop(1);
_root.gotoAndStop("about");
}

Developer
10-15-2001, 01:59 PM
Jesse, even after the change it is still working the same way as it was! I'm going insane. HELP

Jesse
10-16-2001, 04:57 AM
I think you have an error elsewhere. Post the FLA (on your own webhost if you can) so we can take a look