Question:

ActionScript 3.0 question?

by  |  earlier

0 LIKES UnLike

How do I delete an instance of an object from the stage using actionscript?

For example, if there is an instance called "box" on the stage, imported from the library, how do I delete it?

var box:box_mc = new box_mc();

addChild(box);

// These two lines create the instance on the stage

How do i delete the instance "box"?

 Tags:

   Report

1 ANSWERS


  1. Hello Friend,

    Assuming you have it on stage, and you are within the parental hierarchical bounds to remove it, you can use removeChild(objName); to get rid of it.  Beware, if you are not within the parental bounds (restricted by OOP parental permissoins) you will have to find the right place to use removeChild.

    I hope that helps.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions