views:

26

answers:

2

I see plenty of AS3 examples of loading 1 image file into a 1 frame movieclip, but how can you take a folder full of images, load them and treat each image as an individual frame of a single movieclip?

The essential problem I seem to keep running into is how to create a keyframe during runtime...

A: 

I haven really tried it but maybe if you do something like

mc.addChild(image); mc.nextFrame(); mc.addChild(image2); mc.nextFrame();

Cant tell you for sure that it works though :)

What are you going to use this movieclip for ?

lollertits
A: 

You can't do anything like that, because you can't create keyframes at runtime and when add a child to the MovieClip with code, it wont add it to the current frame, it will just add it to the clip's display list, so what you added dynamically will be on every frame.

You should probably try loading your images and storing them in an array or making an array of movie clips or sprites that each have on image. That way you have all the images in a list of clips, and you can still use those clips and display them however you want in your flash movie.

__dominic