MapleIndex
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeLatest imagesSearchRegisterLog in

 

 [TUTORIAL] simple flash movement tutorial (as2.0) part 1

Go down 

Did this tut help you?
Yes
[TUTORIAL] simple flash movement tutorial (as2.0) part 1 Vote_lcap100%[TUTORIAL] simple flash movement tutorial (as2.0) part 1 Vote_rcap
 100% [ 1 ]
No
[TUTORIAL] simple flash movement tutorial (as2.0) part 1 Vote_lcap0%[TUTORIAL] simple flash movement tutorial (as2.0) part 1 Vote_rcap
 0% [ 0 ]
Total Votes : 1
 

AuthorMessage
zhulov3rz
Moderator
zhulov3rz


Male
Number of posts : 15
Location : singapore
Registration date : 2009-03-15

[TUTORIAL] simple flash movement tutorial (as2.0) part 1 Empty
PostSubject: [TUTORIAL] simple flash movement tutorial (as2.0) part 1   [TUTORIAL] simple flash movement tutorial (as2.0) part 1 EmptyThu Mar 19, 2009 6:42 am

OK this is for people who have learnt event handlers and want to move objects
this is very basic
lets say you have a head (of a mapler) and want to move it

the code will be this
Code:


      onClipEvent (enterFrame) {

          if (Key.isDown(Key.LEFT)) {

              _x--;

          }
 
          if (Key.isDown(Key.RIGHT)) {
 
              _x++;
 
          }
 
          if (Key.isDown(Key.UP)) {
 
              _y--;
 
          }
 
          if (Key.isDown(Key.DOWN)) {
 
              _y++;
 
          }
 
      }


Explanation:
onClipEvent(enterFrame)
this is the event handler
tells it to execute the following from the { to the last }

lines 2 -4 tells it to move in the direction specified depending on which key is down
the other lines are pretty similar

please comment and inform me of any errors


Last edited by zhulov3rz on Thu Mar 19, 2009 6:52 am; edited 1 time in total (Reason for editing : Added 'poll')
Back to top Go down
 
[TUTORIAL] simple flash movement tutorial (as2.0) part 1
Back to top 
Page 1 of 1
 Similar topics
-
» [TUTORIAL] simple flash movement tutorial (as2.0) part 0
» [Tutorial] How to create a basic maplestory flash game
» Flash ideas
» Jasons Brawler Guide : Part 1 (1st Job)
» Spring Break Event Part 2

Permissions in this forum:You cannot reply to topics in this forum
MapleIndex :: MapleIndex.com :: Flash Games-
Jump to: