when you roll over a button, is there an event handler with an equivelant to hold or something? i want to move a MC’s _x value left or right depending on the button being hovered over (left or right). it only works when the user PRESSES or RELEASES… and the picture in the MC is 4000 pixels wide lol.
any ideas? or will i have to create some sort of while loop?
Flash ‘buttons’ (as opposed to plain-old movieclips) tend to eat rollOver events, so I usually use movieclips instead, if I’m doing anything remotely fancy.
i’m pretty good with flash overall, i just dont know what kind of actionscript i need to make it work so there is a continous shift left or right of the picture inside an MC while the user hovers over a button (this is so they don’t have to press repeatedly).
hmm… i actually thought about this, but i’m confused as to how flash registers the on(EnterFrame) command.
for example, if i have one frame with a stop(); command right away (meaning it won’t advance past that frame), then will the on(EnterFrame) keep happening.
enterFrame events, either onEnterFrame functions defined in movieclips or onClipEvent(enterFrame) events put ON movieclips run continuously based on the Flash document’s frames per second setting. They are not dependant on whether or not the movieclip they are associated with are actually playing or not. So, though a movieclip may not actually be “entering” a new frame, an enterFrame event will still run after seconds/frames per seconds amount of time has passed.
so doea onClipEvent(load) only happen once and onClipEvent(enterFrame) continuously happen (i.e., a 30 fps movie, it will do the code 30 times a second)?
if this is the case, it really cleared a lot up for me :).
What you could do is set the onEnterFrame handler to make the movieclip continuously move to the left when you rollOver the left button, and have it delete the onEnterFrame handler when you rollOut that button. Since they’re buttons, I’d suggest creating an auxiliary movieclip to use it’s onEnterFrame handler because I don’t know which you are already using or not. You can use another movieclips onEnterFrame handler if you want to, I’m just using an auxiliary movieclip here to be safe.