what i want to do is to remove some movie clips through a loop, but i don't want them do dissapear all at once, but one by one... let's say 0.2 seconds between them... thanks [q][i]Originally posted by: [b][b]anonymous thing[/b][/b][/i] not directly... You can use a timer(setInterval) that will change state of your application; it might be a boolean value for example. Could you post, with more details, what you want to do?[/q]
In the example a put two pieces of code: one for a complete removeMovieClip and second for hidding mc so take one of this solution. // list your mc by there name // if scope are differents use _target prop for each of your mc var arrMcToRemove:Array = ["mc1","mc2","mc3","mc4","mc5","mc6","mc7"]; var intIndexToRemove:Number = 0; var intIdInterval:Number = 0; var intMMsecTimer:Number = 200; // nb of mmsec for your timer(1seconde == 1000mmsec) function yourFunctionName(){ clearInterval(this.intIdInterval); // remove mc // first this is your scope; it can be everything(_root[..., _level0[..., .....) this[this.arrMcToRemove[this.intIndexToRemove]].removeMovieClip(); // hide mc this[this.arrMcToRemove[this.intIndexToRemove]]._visible = false; if(++this.intIndexToRemove < this.arrMcToRemove.length) this.intIdInterval = setInterval(this, "yourFunctionName", this.intMMsecTimer); } test_btn.onPress = function(){ yourFunctionName(); }
Don't see what you're looking for? Try a search.
|