Posted By

Winkyboy on 09/09/08


Tagged

actionscript mouse repeat down hold


Versions (?)

Mousedown on actionscript button


 / Published in: ActionScript
 

URL: http://www.actionscript.org/forums/showthread.php3?t=179427

Code for allowing users to hold the mouse button down on a movie clip (button) for a constant effect.

  1. myButton.onPress = function() {
  2. this.ButtonDown = true
  3. }
  4. myButton.onRelease = myButton.onDragOut = function() {
  5. this.ButtonDown = false
  6. }
  7. myButton.onEnterFrame = function() {
  8. if(this.ButtonDown) {
  9. //Move Carousel
  10. }
  11. }

Report this snippet  

You need to login to post a comment.