View Full Version : Help needed with buttons and variables
Karnage
08-15-2002, 04:20 AM
Ok, so I know how to set a variable using a standard no frills button. My dilemma is here: I have a button with a movie clip that plays in the over sequence. I put that button in another movie clip, so when its clicked, it plays a movie on the down sequence without having to hold the button down. Both are just small animations for the button. I want to make the whole thing set a variable, but it doesnt work, where as a normal button with no frills sets a variable. What do i need to do/change to keep the button animated, but still have it set a variable?:confused:
Artie Effem
08-15-2002, 04:26 AM
Not quite sure what you are meaning. Could it be that your variable is now inside the new movieclip you crated and you now need to reference it with a different path:
_root.newMovieClip.variableName;
farafiro
08-15-2002, 08:09 AM
....make the whole thing set a variable
what ya mean by that? u wanna set a new var or change it??
sumul
08-15-2002, 09:27 AM
Because you placed the button in another movie clip, you'd have to change anything like:
variable = value;
to:
_parent.variable = value;
Karnage
08-16-2002, 11:12 PM
If you make a normal button, you can goto actions, and set it so when you press it, it sets a variable to something. so its like onpress age = 18. And then you can have a dynamic text box display the age. With a normal button this work, however i have an animated button. A button that changes on the mouseover, and finishes another animation when pressed. For example a circle that grows bigger on the mouse over, and then shrinks back instead of snapping back to its original size.What i did was make a button, Put a movieclip in the "over" part, then i took the whole thing, and put it in a movie clip, and added an animation so when the button is clicked, it plays the animation in the movie clip. I did this instead of setting the "down" position as a movie clip because this way you dont have to hold the mouse button down to view the whole animation. I want this fully animated button to change a variable when clicked, but i cant figure out how to do it. Am I making the fully animated button wrong? If so please tell me the correct way. This is annoying the hell out of me, if i have it set a variable, it doesnt play the animation. Any help is appreciated.
Karnage
08-16-2002, 11:47 PM
Nevermind, I finally figured it out. I dunno if it's the proper way or not, but it works, I used a mixture of the replies i got and some trial and error. Thanks all.:)
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.