Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(contentArray[0] == "cords"){
- if(Boolean(this.getChildByName(contentArray[1]))) {
- var mousex = contentArray[7];
- var mousey = contentArray[9];
- var avatarx = contentArray[3];
- var avatary = contentArray[5];
- if(contentArray[1] == "avatar"+id){
- }else{
- stage.addEventListener(Event.ENTER_FRAME, loop);
- function loop(Event)
- {
- if (mousey>getChildByName(contentArray[1]).y)
- {
- getChildByName(contentArray[1]).y += movespeed;
- }
- if (mousey<getChildByName(contentArray[1]).y)
- {
- getChildByName(contentArray[1]).y -= movespeed;
- }
- if (mousex>getChildByName(contentArray[1]).x)
- {
- getChildByName(contentArray[1]).x += movespeed;
- }
- if (mousex<getChildByName(contentArray[1]).x)
- {
- getChildByName(contentArray[1]).x -= movespeed;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment