I need an as2 method to invoke from one movieclip to find all (unknown) sibling movieclips and return their instance names.
This works very differently in AS3 vs. AS2 … AS2 has depths, AS3 hasn’t so you simply can’t do the same thing in AS2 …
But getInstanceAtDepth(); is the thing you’ll need to accomplish what you need
Thanks. but I had tried geInstanceAt Depth(), and figured that I’d just iterate through all depths from zero to getDepth() (since I only wanted to find instances which I was sure were below the depth of my calling movie clip.) Trouble is in a test situation it didn’t work – so I did a trace to find the actual depth of a movie clip (instance name, mcClip) I had placed on the stage below my calling clip and mcClip.getDepth() returned a value of -16381! and my calling clips depth was 0 when I had placed it at the top) so how do I know what range of depths I need to iterate through to be sure I get them all?
Never mind! – I guess I should have read the documentation a little deeper I now see that depths start at -16381 – so -16383 is actually depth 0!
I should have stuck with AS3 . That’s what I started with when I “discovered” Flash late last year but due to what I perceived as a lack of popularity for AS3 files on FlashDen I decided to try writing an AS2 file for my first FD submission. (I figured how different can it be )
It’s funny how I see people here talking about “getting their hands dirty” on AS3 – I tell you, when I’ve finished with this one I can’t wait to wipe the AS2 off my hands and get back to AS3
AS2 is terrible in comparison with AS3 … Yep, the code is longer with AS3 but it is much cleaner, easier to debug, easier to use and more powerful