u6crash
12-04-2004, 05:00 AM
In my Flash movie I'm trying to create a simple moving button so that when the user clicks, an instance of a movie clip becomes visible. Here's how I've gone about creating the button.
The button is created by a symbol graphic. The button has the following code:on (press) {
_root.mainmovie.q._visible = true;}
on (release) {
_root.mainmovie.q._visible = false;}
The button is then animated by being put into a looping movie clip where a motion tween is used. However, the click and release only works some of the time, as if the code were only applied to a single frame or something, but it is clearly applied to the whole button. I have also tried to apply the code directly to the movie clip, but I believe the on code is reserved specifically for buttons. I have also tried creating the movie clip with motion a motion tween on the graphic, and then dropping that movie clip into the button.
Am I going about this completely wrong? Any help would be great. Thank you.
The button is created by a symbol graphic. The button has the following code:on (press) {
_root.mainmovie.q._visible = true;}
on (release) {
_root.mainmovie.q._visible = false;}
The button is then animated by being put into a looping movie clip where a motion tween is used. However, the click and release only works some of the time, as if the code were only applied to a single frame or something, but it is clearly applied to the whole button. I have also tried to apply the code directly to the movie clip, but I believe the on code is reserved specifically for buttons. I have also tried creating the movie clip with motion a motion tween on the graphic, and then dropping that movie clip into the button.
Am I going about this completely wrong? Any help would be great. Thank you.