PDA

View Full Version : Possible to rename a MC created with createEmptyMovieClip?


SilentBob
08-27-2002, 06:04 PM
Greetings,

I am just starting out with Actionscript and have a quick question.

I have a movieclip instance located on _root called satHolder. Upon starting the movie, I want to create a loop of jpg images inside of satHolder. I do this using a combination of createEmptyMovieClip and loadMovie as follows:

for(var i = 0; i < 5; i++)
{
var frameDepth = 4 - i;
_root.satHolder.createEmptyMovieClip("frame"+i, frameDepth);
// jpeg name sent by a php script, so that is dynamic
loadMovie(this["image"+i],"_root.satHolder.frame"+i);
}

This little bit of code (along with the larger parts to do the actual transfer, works great. It populates the frames correctly and I can loop them very nicely with specially placed swapDepths commands.

Here is the rub. The images come in about every five minutes and I would like to do a FIFO setup. I have tried to code this, but to no avail. My ideal setup would be to removeMovieClip the first frame (which works, I can watch them be removed in the debugger), and move each image down the list and then load the last image with the new frame. Does anyone have a recommendation on what I could do here? The images are about 100K in size, so to redo the loop each five minutes (while possible since the display machine is right next to the server on the network), would not be ideal. Any help would greatly appreciated.

xxlm
08-28-2002, 12:23 AM
This post has been identified as a 'crosspost', that is, it has been posted multiple times on the forums. Please post each question just once and we will do our best to answer it. Thanks.
Original thread (http://www.actionscript.org/forums/showthread.php3?threadid=15410)