Hi there,
i have problem with AS2.
My code:
class Menu extends MovieClip
{
private var mcItem:MovieClip;
public function Menu()
{
AsBroadcaster.initialize(this);
}
public function addMenu(desc:String):Void
{
this.mcItem =
this.attachMovie("mcMenuItem","mcMenuItem"+this.getNextHighestDepth().toString(),this.getNextHighestDepth(),{_x:this.width});
this.addListener(this.mcItem);
mcItem.txtText.text = desc;
mcItem.txtText.autoSize = "left";
}
}
write out this error message:
There is no method with the name 'addListener'.
this.addListener(this.mcItem);
trace(this) in method addMenu -> _level0.mcMenu
_level0.mcMenu.addListener(this.mcItem); -> working OK.....
I don`t know WHY 'this' don`t work and full absolute path to object (MC)
working OK...
thank you
pavel
_______________________________________________
[email protected]
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