A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [HELP] Click and hold

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    [HELP] Click and hold

    Hey everyone

    Well I tried posting this in another forum, but for some reason things dont seem as lively as they do here and besides, its more friendlier here


    Anyways, I just need quick help on how to do a (most likely) simple thing. All I want to have happen is upon clicking a button and holding, a dynamic text box starting at 1940 will increase by 1's relativley fast

    And then once you release ... stop

    Thats all, and I cant seem to figure it out

    Many thanks

  2. #2
    Run for your life! Phlook's Avatar
    Join Date
    Jul 2003
    Location
    Vancouver, Canada
    Posts
    679
    Code:
    on(press){
    this.onEnterFrame = function(){
    variable ++;
    }
    }
    on(release){
    delete this.onEnterFrame;
    }

  3. #3
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    I would use setIntervals. That would give me a lot of power over the speed and how I called it. There are a few threads around here, I'm almost positive, for you to look at for more.

  4. #4
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Many thanks, it works

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