PDA

View Full Version : Killing a instance of a movie...



Fire-port
December 27th, 2007, 06:53 AM
hi ,

i had tried to create a instance of a movie clip in flash.. by using attachmovie function in action script.... :q:but i can't figure it out , how can i kill the instance on a trigger!!! , but i found temporarily solution to change the x y position to hide it from the main screen..... any help ? from you guys :hoser:

Dazzer
December 27th, 2007, 09:40 AM
remove it from the display list using removeChild method of displayContainer.

Gathan
December 27th, 2007, 02:04 PM
It's important to remember that removing a object from the display list doesn't kill the instance persay as it used to in AS 2.0. Infact if there is code inside of the object it will still execute even after its been removed from the display list.
So you must kill any code that might be executing inside of the object as will and kill any references to the object also so the GC will know to get rid of it from memory when the time comes.