Skip navigation
Currently Being Moderated

How do you delete all dynamic variables of a movieclip?

Apr 4, 2012 8:37 AM

I have the movieclip:
mcGrazer

with quite a few dynamic variables like this:

mcGrazer.var1

mcGrazer.var2

etc.

 

If I use:

delete mcGrazer;

it doesn't delete the variables.

But if I use:

delete mcGrazer.var1

it deletes that individual variable.

 

is there a way to destroy all information (variables) of a particular movieclip?

 

Thanks.

 
Replies
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 5, 2012 8:50 AM   in reply to prodigalmaster

    you can use:

     

    function deleteVariablesF(mc:MovieClip):Void{

    for(var s:String in mc){

    delete a[s];

    }

    }

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points