[Flashcoders] Iterate over all movieclips in a timeline
Hello. I feel a bit boneheaded asking this... is there any way of iterating over all movie clips in a timeline? At the moment, I just have a hard coded array that contains references to the clips I need. This isn't a big problem, but that just means one more thing to edit each time I add or remove clips. (and I'd have to name them as well). Thanks. -- Haikal Saadh Applications Programmer ICT Resources, TALSS QUT Kelvin Grove ___ Flashcoders@chattyfig.figleaf.com 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
RE: [Flashcoders] Iterate over all movieclips in a timeline
I feel a bit boneheaded asking this... is there any way of iterating over all movie clips in a timeline? for (var a in this) { if (this[a] instanceof MovieClip) { trace(this[a]._name); } } BLITZ | Steven Sacks - 310-551-0200 x209 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] Iterate over all movieclips in a timeline
this will only do the current frame, you cannot do the entire timeline (well you can in jsfl :) ) On 10/9/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: I feel a bit boneheaded asking this... is there any way of iterating over all movie clips in a timeline? for (var a in this) { if (this[a] instanceof MovieClip) { trace(this[a]._name); } } BLITZ | Steven Sacks - 310-551-0200 x209 ___ Flashcoders@chattyfig.figleaf.com 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 -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] Iterate over all movieclips in a timeline
Ah, thanks, that's exactly what I needed. Current frame only is fine, as it's only going to do some initialisation at frame 1 anyway. Steven Sacks | BLITZ wrote: I feel a bit boneheaded asking this... is there any way of iterating over all movie clips in a timeline? for (var a in this) { if (this[a] instanceof MovieClip) { trace(this[a]._name); } } BLITZ | Steven Sacks - 310-551-0200 x209 ___ Flashcoders@chattyfig.figleaf.com 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 -- Haikal Saadh Applications Programmer ICT Resources, TALSS QUT Kelvin Grove ___ Flashcoders@chattyfig.figleaf.com 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
[Flashcoders] Iterate over all movieclips in a timeline
Pillage through and get nested mc's function pillage(mc) { for (var a in mc) { if (mc[a] instanceof MovieClip) { trace(mc[a]._name); pillage(mc[a]); } } } pillage(_root) Regards, Bjorn Schultheiss Senior Flash Developer QDC Technologies -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: Tuesday, 10 October 2006 11:38 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Iterate over all movieclips in a timeline this will only do the current frame, you cannot do the entire timeline (well you can in jsfl :) ) On 10/9/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: I feel a bit boneheaded asking this... is there any way of iterating over all movie clips in a timeline? for (var a in this) { if (this[a] instanceof MovieClip) { trace(this[a]._name); } } BLITZ | Steven Sacks - 310-551-0200 x209 ___ Flashcoders@chattyfig.figleaf.com 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 -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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