Considering how display lists have changed between AS 2 and AS 3, I doubt
this is going to be really useful, but perhaps for tracing out a path, it
could the job.


import flash.display.DisplayObject;

function getFullPath(dpo:DisplayObject):String{

 var path:Array = [];

 while(dpo.parent) {
  path.unshift(dpo.name);
  dpo = dpo.parent;
 }

 return path.joint(".");

}
PS: I don't know if there's a builtin method for this.


Cheers
Juan Pablo Califano


2008/11/27, Michael William Ypes <[EMAIL PROTECTED]>:
>
> In as2 whenever you wanted to know the heirarchy of the movieclip I would
> just trace(this) and it would give _level0.mc1.mc2.mc3 etc.
>
> How can you achieve that in as3 as it returns the type [object MovieClip]
> and not its location.
>
> I am sure it can be done as it was a very handy thing for when you get lost
> in your mcs :)
>
> Cheers
>
> M
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to