Question about buttons

ok i have a movie called m_menuappear and i want when the user clicks on it the movie to play, because when i do it with a button it requires the user to hold down the button instead of him just clicking it once anyone have the code for this??

Do you mean like this…?

on (release){
_root.m_menuappear.play();
}

???

well here ill show you what im trying to do click on

www.autodaze.com/mainmenu.html

and click and hold the button see! i dont want the user to hold the button i want when the user clicks ont he buttons that the menu grows bigger which is a movie clip so how would i do this??

Alrighty…

What code are you using right now?

im using the button on the DOWN STATE and thats all

Oh, that is why.

Ok, you are using Flash MX so you can do this.

Instead of using a button symbol, use a movie clip symbol.

Then create your tween inside. And add a stop() action on the first and last frames.

Go back to the main stage where your movie clip is. Right click on your movie clip and open the actions panel.

In there type…

on (release){
this.play();
}

Although this will require you have a button inside the movie clip that makes it gotoAndStop(1) (at frame 1, or the original look)

ok im going to try it… ill do it step by step from your instructions :slight_smile:

hey im still a wee bit confused

code:--------------------------------------------------------------------------------on (release){
this.play();
}--------------------------------------------------------------------------------

so i put that EXACT CODE???

and about the button thing where do i put it in the movie in a new layer??? as you can see i get easliy confused :*(

do you use MIRC???

Yeah you put that exact code :slight_smile: With Flash MX you can use the on handlers on movie clips too, you can’t do that in Flash 5.

And the button can go on a new layer yes. And you can put it on the last frame if you want.

hey i put your code now heres my other question! now that i have clicked on it and it zoomed up , how can i tell it to zoom back to its original position??? oh and i didnt even use the GOTOand stop button thing is there going to be a problem??

You can either tween it back and have your button in your clip play the tween.

Or you can use actionscript to play it in reverse, there is a whole entire thread dedicated to different methods of this way…

http://www.kirupaforum.com/showthread.php?s=&threadid=11427&highlight=forward+and+backwards