Have you tried...
 
this._targetMc.destroyObject(eval("slidemenu.theThumb" + i));


Sometimes I find eval works when [] doesn't. -Andy



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dnk
Sent: Thursday, August 10, 2006 3:07 AM
To: Flashcoders mailing list
Subject: [Flashcoders] DK - destroying objects from a class using
arraynotation

Hi there! I have a class in which a few objects are created from my library
(loader
component instances and a button instance). They were created sequenciually
(IE hit0,
hit1, hit2, etc) At any rate - I need to destroy them abd then recreate
them.

I am having some issues finding the proper syntax to use destroyObject....

For example I tried.....


(from within my class)


function killElements() 
{
  for (var i:Number = 0; i < 35; i++)
    {
      this._targetMc.destroyObject(slidemenu["theThumb" + i]);
      this._targetMc.destroyObject(slidemenu["theHit" + i]);
    }
}

this obviously does not work....


My target hierarchy is....

_root._targetMc.slidemenu (with the button and loader objects created in
here).

Ideas?

Thanks!
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to