dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [Resolved] [Resolved] [Resolved] [Resolved] Continuous action on(Press)

  1. #1
    Member of the Flashist Party
    Join Date
    Nov 2001
    Posts
    146
    How do I program an action to continuously happen WHILE the mouse button is being pressed, rather than just once?

    I programmed my mouse to move a thumbnail slider

    on (Press)
    slider._x += 10

    But it only slides it by 10 pix just once. I have to keep pressing the button.

    How do I program it to continously slide while I hold down the button?

    Thanks in advance for anybody's help.

  2. #2
    minor king
    Join Date
    Jul 2001
    Location
    Asheville, NC
    Posts
    81
    ok, i think i can help you out.

    on your button :

    Code:
     on(press) { slidedown = true; }
            on(release) {slidedown = false; }
    on your slider MC :

    Code:
     onClipEvent(enterFrame) {
               if (slidedown = true) {
                     slider._x += 10;
                   }

    hope this helps
    post again and let me know

  3. #3
    Member of the Flashist Party
    Join Date
    Nov 2001
    Posts
    146
    Thanks.

    It looks like that would work,except that I'm having problems passing the variable from my button to my MC. They both reside in the same timeline, so I'm trying to figure out what the problem is.


  4. #4
    Member of the Flashist Party
    Join Date
    Nov 2001
    Posts
    146

    YES!!!!!

    I finally figured it out and it works perfectly!!!!

    Thanks again. I knew it was simple. I just wasn't getting it.

    I appreciate your help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center