Alilem
Alilem

Reputation: 3

Frame by Frame animation AS3

This is for AS3 FlashDevelop, Basically I'm super new to this. The most I've done in AS3 coding is display multiple images on a single frame and parallax images.

However I want to know how to display embedded Bitmap (.png pictures) as frames one after another, like frame 1 = embedded image 1 frame 2 = embedded image 2 (frame 1 is gone but 2 shows) frame 3 = embedded image 3 (and so on.)

and they would continuously play as an animation and stop at the first frame until I press play again I believe I would use nextFrame, stop and gotoframe but don't know where and what I need to code, I heard of bitmapdata but I'm stuck on how to use it in purpose of animating frame by frame.

EDIT: No I'm not animating sprites, rather it's more like cartoon process where you'll go frame by frame of the image files, as one appear the previous one disappears.

Upvotes: 0

Views: 150

Answers (1)

sfxworks
sfxworks

Reputation: 1091

You could iterate through each frame and add the images after you load them.

If you do addChild() it should add it to the current frame you're on. Load the next image with a Loader, place it down with addChild, nextFrame(), and repeat until you have all the images. Then when they're all loaded (from what I guess would be some list you'd have in an array or an xml) take the user to frame 1. You might want to do this inside of a movieclip while having that and a cover graphic on your main stage so the user doesn't see all of the images while they're being loaded and placed.

[More about adding display objects to frames]

Upvotes: 1

Related Questions