A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: dragging a level

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Posts
    29

    dragging a level

    I had it, then I forgot how I did it!

    How do you code a frame so the whole level drags when you press?

  2. #2
    Junior Member
    Join Date
    Feb 2005
    Location
    NORWAY
    Posts
    19
    Do you mean how to move the whole stage?

    If you pass this code into a movieclip, the whole stage will move to the left when pressing left. You can use the _x and _y properties after the target path "_root".

    _root._x
    _root._y
    Code:
    onClipEvent(enterFrame){
         if(Key.isDown(Key.LEFT)){
              _root._x -= 5;
         }
    }
    I know the same code works with _level instead of _root, but can you tell me the difference? I haven't understood yet.. Thnx ahead of time
    Last edited by LarPed; 02-08-2005 at 05:53 PM.

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