Copy link to clipboard
Copied
So i just started working with flash and i have come across something i did not learn yet, i am required to make a simple sidescrolling game, i know how to make the character move using sprites but i do not know how i can code the animation for it, basically i have a simple animation made out of 8 frames, moving to the right, but i have no idea how to actually write the code for it so it will only move when i press the right arrow key, i looked at the code snippets and it says it must be converted to a movie clip, the frames are currently classed as graphics.
Waiting for any suggestions.
Thank you.
assign your movieclip an instance name (eg, character_mc) and use:
character_mc.play(); // when your character moves and
character_mc.stop(); // when your character stops.
//
when you get a little more advanced, you'll use gotoAndStop() and gotoAndPlay() depending on what your character is doing and your particular character_mc frames.
Copy link to clipboard
Copied
assign your movieclip an instance name (eg, character_mc) and use:
character_mc.play(); // when your character moves and
character_mc.stop(); // when your character stops.
//
when you get a little more advanced, you'll use gotoAndStop() and gotoAndPlay() depending on what your character is doing and your particular character_mc frames.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now