orangeblue
Programmer
Hi
I am trying to load a the same movieclip on to the stage every 5 secs. I am having problems with setinterval as it doesn't seem to work.
please can u help here is the code
//this function will get a loop of the number of daisys
getdaisys = function(){
i = 1 ;
//geting a the movieclip
//setInterval(duplicateMovieClip(test, "daisy"+i+"_mc", i), 5000);
_root.attachMovie("mc_daisy_ani", "daisy_mc"+i, i)
this._x+=(Math.random()*4)-2 ;
this._y+=(Math.random()*4)-2;
this.gotoAndPlay;
}
//call the function
for(i=1; i <= 5; i++){
setInterval(getdaisys(),5000);
};
I am trying to load a the same movieclip on to the stage every 5 secs. I am having problems with setinterval as it doesn't seem to work.
please can u help here is the code
//this function will get a loop of the number of daisys
getdaisys = function(){
i = 1 ;
//geting a the movieclip
//setInterval(duplicateMovieClip(test, "daisy"+i+"_mc", i), 5000);
_root.attachMovie("mc_daisy_ani", "daisy_mc"+i, i)
this._x+=(Math.random()*4)-2 ;
this._y+=(Math.random()*4)-2;
this.gotoAndPlay;
}
//call the function
for(i=1; i <= 5; i++){
setInterval(getdaisys(),5000);
};