A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Animation won't go

  1. #1
    Junior Member
    Join Date
    Nov 2014
    Posts
    2

    Animation won't go

    Hello guys! i've been working some decent time in Game-Maker, about 4 years, I recently started new project in flash cc.

    I have the character from top down view, I wanna test Movement, that if X or Y is higher or lower than 0, the animation will go , else he wil stay at frame 0, so I did in main.as file:

    Code:
    if (xspeed > 0) { player.gotoAndPlay(0);  } else { player.gotoAndStop(0); }
    if (yspeed > 0) { player.gotoAndPlay(0);  } else { player.gotoAndStop(0); }
    if (xspeed < 0) { player.gotoAndPlay(0);  } else { player.gotoAndStop(0); }
    if (yspeed < 0) { player.gotoAndPlay(0);  } else { player.gotoAndStop(0); }
    its in ENTER_FRAME Event, i have also movement there, everything works fine, except animations, just stops at 0. frame, and wont go to next.

    Thank you so much for your time guys!

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    I believe timelines start at frame 1 and not frame 0, not sure it if helps your problem.
    Plus all if else statements are conflicting with ine another.

  3. #3
    Junior Member
    Join Date
    Nov 2014
    Posts
    2
    Thanks man, i figured out how its done.

    Thank you for your time

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