Click to See Complete Forum and Search --> : loadClip error...


tomyknoker
03-19-2007, 09:41 PM
Hi all,

When I run this on my timeline it works fine

mcl.loadClip(Math.floor(Math.random() * 6) + ".jpg", this);


I changed the code so that it will load a specific image but when I run this it gives me an error! Any ideas?
mcl.loadClip(Math.floor("1.jpg", this);

This is the fucntion at the beginning of my movie, but don't need to change that just need to edit the above line...


var mcl:MovieClipLoader = new MovieClipLoader();

function onLoadInit(targ:MovieClip):Void
{
// Fade to 100 in 3 seconds using the easeoutquad tween
targ.alphaTo(100, 3, "easeoutquad");
}

// Start the MCL working
mcl.addListener(this);

LYs
03-22-2007, 06:28 AM
mcl.loadClip(Math.floor("1.jpg", this);
--> MAth.floor needs a number
mcl.loadClip("1.jpg", this); should work