1 Reply Latest reply on May 2, 2012 9:15 AM by iFlashAppsToo

    Manipulating curtain with mouse


      I was wondering if anyone has come across a toturial that shows you how to click a drag a curtain to reveal what's behind it and then having the curtain drop back to closed once the mouse button is let go.


      Any help is appreciated. Thanks!

        • 1. Re: Manipulating curtain with mouse
          iFlashAppsToo Level 3

          basic logic:


          create variable for defaultposition

          create variable for newposition

          set a listener for curtain.mouse_down

          set a listener for curtain.mouse_up


          when you mouse_down, set listener for curtain.mouse_move


          when you mouse_move, set newposition to mouseX

          then, curtain.x = newposition


          when you mouse_up, remove listener for mouse_move

          then, set curtain.x back to defaultposition