[Flashcoders] Adding listener

2010-06-30 Thread Lehr, Theodore
Is it possible to add a listener to a multitude of mcs through a loop? so instead of mc1.addEventListener mc2.add mc3.add ... ... .. maybe I have an array with each mc name and then loop through it to add the event listeners? ___ Flashcoders

RE: [Flashcoders] Adding listener

2010-06-30 Thread Merrill, Jason
Sent: Wednesday, June 30, 2010 10:36 AM To: Flash Coders List Subject: [Flashcoders] Adding listener Is it possible to add a listener to a multitude of mcs through a loop? so instead of mc1.addEventListener mc2.add mc3.add ... ... .. maybe I have an array with each mc name and then loop

RE: [Flashcoders] Adding listener

2010-06-30 Thread Lehr, Theodore
Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Wednesday, June 30, 2010 10:45 AM To: Flash Coders List Subject: RE: [Flashcoders] Adding listener Easy: var myMovieClips:Array = [mc1, mc2, mc3, mc4]; for each (var mc:MovieClip in myMovieClips) { mc.addEventListener

RE: [Flashcoders] Adding listener

2010-06-30 Thread Lehr, Theodore
: [Flashcoders] Adding listener Easy: var myMovieClips:Array = [mc1, mc2, mc3, mc4]; for each (var mc:MovieClip in myMovieClips) { mc.addEventListener(WhateverEvent.WHATEVER, onWhateverEvent); } Jason Merrill Instructional Technology Architect Bank of America Global Learning Join

Re: [Flashcoders] Adding listener

2010-06-30 Thread Henrik Andersson
Yes, just use the dynamic property syntax if it is timeline instances. Otherwise, just add the listener when you create each object. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] Adding listener

2010-06-30 Thread Merrill, Jason
Subject: RE: [Flashcoders] Adding listener These are mcs that are created on the stage - not in code How would I refer to them in this: var myMovieClips:Array = [mc1, mc2, mc3, mc4]; ?? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun