Copy link to clipboard
Copied
Hello,
I'm quite new to flash development.
I'm struggling for many hours to understand the origin of several properties and their hierarchy inside as3 linked class.
The setup is:
there is a mask layer with several masked layers.
There is a movie clip for each of masked layers in libarary (some of it linked to as3):
I added layer label inside () next to name of each movie clip
Also for PhotoContainer movie clip there is external as3 class
In flash debugger i also see the following hierarchy of display objects:
Stage -> MaskArea -> photoGuideContainer (movieclip) -> photoGuide (PhotoContainer)
Stage -> MaskArea -> photoDrag (PhotoDrag) -> photoContainer (PhotoContainer)
Stage -> MaskArea -> masker (Masker)
Stage -> MaskArea -> masker (Masker)
Stage -> MaskArea -> collisionArea (Masker)
Stage -> MaskArea -> bg (movieclip)
as3 code in application classes does direct manipultion with above properties like:
maskArea = new MaskArea();
var pc:PhotoContainer = maskArea.photoDrag.photoContainer;
...
without ever creating/relating these display objects.
My questions are:
1. Where are all these objects come from ?
2. How the display object hierarchy is created ?
3. How photoGuide becomes an instance of PhotoContainer (see above Stage -> MaskArea -> photoGuideContainer (movieclip) -> photoGuide (PhotoContainer)) ?
Thank you.
I finally realized what i'm missing. No mistery here:
1. Movie clips were embedded each into other (this explains the certain hierarchy)
2.Some layers were merged. (that explains the mistery )
thanks
Copy link to clipboard
Copied
a. you can't determine what's on stage by checking layer names. unlock them, click a keyframe and check the highlighted on-stage objects to check their library symbol
b. maskArea=new MaskArea() does create a new displayobject.
1. all on-stage objects you see when testing are either on-stage in the ide or created with actionscript
2. if, by hierarchy you mean depth, it is determined by the layer order (for ide created objects) and by the order objects are added to the display list (addChild) for actionscript created objects (unless addChildAt is used).
3. photoGuide isn't an instance of PhotoContainer. photoGuide is a child of photoGuideContainer.
Copy link to clipboard
Copied
3. photoGuide isn't an instance of PhotoContainer. photoGuide is a child of photoGuideContainer.
here is a screenshot from debugger (monster debugger):
I'm asking how this hierarchy is created? Here you see that photoGuide is instance of PhotoContainer.
And i have similar question like Where the "collisionArea" name came from ? it is not in the library, and not in the code...
Copy link to clipboard
Copied
I finally realized what i'm missing. No mistery here:
1. Movie clips were embedded each into other (this explains the certain hierarchy)
2.Some layers were merged. (that explains the mistery )
thanks
Copy link to clipboard
Copied
you're welcome.