Repeating the mouse down in flash

How can I create a button that will repeat an action for as long as the mouse button is down on the button?

Create a movie clip inside the button. Use these commands or something similar; On mouse event/Press/Load Movie (Inside this movie create the actions you are desiring). This should solve your problem.\r\rpj

I don’t know if you completly understand me…What I need is a code that will repeat an action when the button is clicked or actually rolled over.

if the action that you want is just an animation then it then all you have to do is nothing. The movie clip will repeat as long as the mouse is over the button. It is harder to do when you want it on a click since people usually don’t hold down their button very long.\r\rMaybe if you tell us what actions you want repeated, it will help answer your question.\r\rMatt

Here is the code I am attempting to use…\r\ron (press, keyPress “<Left>”) {\r&nbsp &nbsp &nbsp &nbsp tellTarget (“webimaging”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (_currentframe-1);\r&nbsp &nbsp &nbsp &nbsp }\r}

I believe “press” is only accounted for once, so the action related to the event happens only once too…\rMaybe use a variable you use as a switch: on press, var=1, and while var=1, do this (whatever);\ron release, var=0, and so, the condition checked with vars value not being true anymore, the action should stop…?\rHaven’t tried…

Totally agree With the Eyez. Use flags.\rpom 0]

the “button in a movie” technique will do the trick.\r\rmake a button:

 \r\ron(press){\r\r   mpress = 1;\r\r}\r\r\r\ron(release,releaseOutside){\r\r   mpress=0;\r\r}

\r\rmake that button a movie, and in the movie:

 \r\ronClipEvent(enterFrame){\r\r   if(mpress){\r\r      _root.webimaging.prevFrame();\r\r   }\r\r}

\r