I have a main movieclip with a bunch of ‘flies’-MCs flying around randomly in it. If the main mc is placed in main timeline, is there a way to retrieve the actually covered area of the main mc at a certain moment… imagine a snapshot bounding box of all flies at that specific moment.
tia
P.
check the help files for the draw function!
hm… been trying “draw()” in combo with “getColorBoundsRect” but can’t seem to get the correct bounding-box(rectangle) extraction when pouring my MC-with-random-stuff into a BitmapData object.
possibly a matter of color choice or syntax or values. I’ve attached testing .fla if anyone wants to take a peek, appreciated.
P.
Although I would prefer to have an AS2 and AS3 method, I found that in AS3 one can use getBounds or getRect. See attachment (experiment2c.fla).
I haven’t been able to modify it to AS2 yet. Anybody any idea how to correct the draw() + getColorBoundsRect() to get same data (experiment2aa.fla), those probably could work in AS2 as well?
P
What’s wrong with getBounds in AS2?
Isn’t it AS3 only?
Help documentation;
Language Version : ActionScript 3.0
Player Version : Flash Player 9
did i miss something?
Well quit looking in the AS3 reference
It’s been around since FP5.
hmm… tried it out but it returns [type Object] when tracing.
I have an mc instance “mmc” in root, and script
var effectarea = mmc.getBounds(this)
trace(effectarea)
it’s not tracing a rectangle as in AS3 e.g. (x=166.75, y=172.75, w=58.25, h=52.25)
must be close to working correctly, no?
found it …
clipBounds = clip.getBounds(_root);
clip2._x = clipBounds.xMax;
solution lies in xMin, xMax , yMin, yMax…
Yeah it returns a regular object with properties xMax, xMin, yMax and yMin - not a Rectangle as in AS3.