Control a Timeline with Mouse Position
_xmouse and Tracing Variables
- Click Statements > User-Defined functions > function
- Type onEnterFrame in the Name box
- Click Statements > Variables > set variable
- The Variable name is xPos
- Type the Value _xmouse
- Select the Expression box
- Click Global Functions > Miscellaneous > trace
- Type xPos in the Message box
- Select the Expression box
Test your movie and have a look at the Output window (It should automatically pop up). You should see a stream of numbers pile up as you move the cursor left and right across the stage: