[QUOTE]Originally posted by Da enforcer
clip events are 'attached' to the clip's instance on the stage. You can set them dynamically but here I am just attaching it to a clip I dragged from the library.Quote:
Originally posted by aversion
Code:// stop clip running
onClipEvent(load){
gotoAndStop(1);
}
// move clip with mouse movement
onClipEvent(enterFrame){
goto = Math.round(_root._xmouse/10);
gotoAndStop(goto);
}
Help! :) Hiya. Is this code for flash 6? Im a newbie and cannot get the code to work. I dont know either where the code needs to be. Does it need to be within the movieclip or outside attached to the clip. Sorry if these are stupid questions but as i said im a newbie and am having alittle trouble with it. Thanks alot
right click on your clip on the stage and select actions, then enter that code in the actions window. Alternatively just click on the clip to focus flash's attention on it and write into the actions window.
you might have to adjust the code a little for your clip, as I say above I have 20 frames in my clip and the movie is 200 pixels wide. So for each 10 pixels the mouse moves across the movie I advance my clip's timeline by one frame. You will have to work out what values you need for your own movie if the sizes are different.
It should work in flash 5 just fine.
:)
