2 Replies Latest reply on Oct 26, 2011 7:11 PM by Natalie Butler

    Help with a timer?

    Natalie Butler

      Here's what I want to do:

       

      When the mouse is pressed (on mouseDown), set sprite.BlendLevel to a value (I know how to do this).

       

      When the mouse is lifted, begin a timer. If the mouse has not been pressed after 30 seconds, the sprite.BlendLevel value changes.

      (I want this timer to reset every time the mouse enters a mouseUp state. HOWEVER, it should not reset every frame update - ONLY when the mouse is first lifted.)

       

      Basically, I'm making it so a touch screen app fades if it hasn't been touched for 30 seconds (with just one big sprite overlaying it at varying blend levels). That's all.

       

       

      I can't wrap my mind around timers, so that's why I'm having problems with figuring this out.

      Thanks for any help you can offer. I truly appreciate it. I feel like there aren't enough people out there working with Director anymore, so finding help like this is valuable.