PDA

View Full Version : place item on stage


BooChoo
07-31-2006, 06:42 AM
Hello. I was wondering if anyone can help with this: I have a series of jpeg images in the library. I would like to sequentially place the first image on the stage from the library hold it for 24 frames, then grab the next image from the library and hold it for 24 frame and so on. I'd like to do this using JSFL. Right now I'm able to just use the first indexed image, but don't know how to tell flash to select the next image.

thanks for your help.

Boo

jjbilly
07-31-2006, 09:03 AM
Can you post the code you have?

mooska
07-31-2006, 09:04 AM
var t = [];
var dd = fl.getDocumentDOM()
for(i in fl.getDocumentDOM().library.items){
var it = dd.library.items[i];
if(dd.library.getItemType(it.name) == "bitmap"){
t.push(it);
fl.trace(it.name);
}
}
var counter = 0;
for(i in t){
var it = t[i];
dd.getTimeline().setSelectedFrames(counter, counter);
dd.getTimeline().convertToKeyframes();
fl.getDocumentDOM().library.addItemToDocument({x:3 59, y:283.9}, t[i].name);

Places any bitmap from library to stage