PDA

View Full Version : To delete or not to delete, this is a question.


hayored
12-09-2002, 12:19 PM
Hi,
I created a movie of rain: I created a movieclip of one drop of water falling down and using method duplicateMovieClip in a loop I put this drop randomly on the scene. So the ActionScript creates a new instances of the water drop without stoping.
Can I run out of memory? What happens to the created instances that finished to play? Do they stay in the memory? Should I delete them? How can I find an instance that finished to play?

Thanks,

YH

farafiro
12-09-2002, 12:51 PM
Actualy u can remove them when the reaches out of the stage, with something like:
if(this["rainDrop"+i]._y> Stage.height){
removeMovieClip(this)
}