[Flashcoders] Var untouch
I duplicate a movie clip to show array label inside but it doesnt work It copy ok but textt isnt fill. If i write directly the mc nzme it work , but I loose dynamic. Have you got an Idea ? var wedgename:Array = Array(always, never, sometimes, yes, no, often, rarely, undecided); var thingname; for (var z:Number=0; zwedgename.length; z++) { _root.attachMovie(wedgelabel, wedgelabel+z, this.getNextHighestDepth(), {_x:(z*10)+100, _y:(z*10)+100}); var thingname = ( wedgelabel+z); trace(thingname); thingname.wedgename.text = wedgename[z]; // doesnt work why ??? wedgelabel0.wedgename.text = wedgename[z]; // trace( wedgelabel0.wedgename.text //=²always²); } Thank you ___ 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] Var untouch
Hello :) try this code : var list:Array = [ always, never, sometimes, yes, no, often, rarely, undecided ] ; var len:Number = list.length ; // important to optimize your speed for (var i:Number=0; i len ; i++) { var current:MovieClip = attachMovie(wedgelabel, wedgelabel+i, i ) ; trace( create : + current) ; current._x = i * 10 + 100 ; current._y = i * 10 + 100 ; current.wedgename.text = list[i]; } You can use a local reference (current in my example) to target your current movieclip, it's more easy ;) EKA+ :) 2006/9/7, Laurent CUCHET [EMAIL PROTECTED]: I duplicate a movie clip to show array label inside but it doesnt work It copy ok but textt isnt fill. If i write directly the mc nzme it work , but I loose dynamic. Have you got an Idea ? var wedgename:Array = Array(always, never, sometimes, yes, no, often, rarely, undecided); var thingname; for (var z:Number=0; zwedgename.length; z++) { _root.attachMovie(wedgelabel, wedgelabel+z, this.getNextHighestDepth(), {_x:(z*10)+100, _y:(z*10)+100}); var thingname = ( wedgelabel+z); trace(thingname); thingname.wedgename.text = wedgename[z]; // doesnt work why ??? wedgelabel0.wedgename.text = wedgename[z]; // trace( wedgelabel0.wedgename.text //=²always²); } Thank you ___ 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
Re: [Flashcoders] Var untouch
Based on your code, Try this: var wedgename:Array = Array(always, never, sometimes, yes, no,often, rarely, undecided); var thingname; for (var z:Number=0; zwedgename.length; z++) { _root.attachMovie(wedgelabel, wedgelabel+z, this.getNextHighestDepth(), {_x:(z*10)+100, _y:(z*10)+100}); _root[wedgelabel+z].wedgename.text = wedgename[z]; } Or this: var wedgename:Array = Array(always, never, sometimes, yes, no,often, rarely, undecided); var thingname; for (var z:Number=0; zwedgename.length; z++) { var thingname = _root.attachMovie(wedgelabel, wedgelabel+z, this.getNextHighestDepth(), {_x:(z*10)+100, _y:(z*10)+100}); thingname.wedgename.text = wedgename[z]; } Cheers Telmo Dias Laurent CUCHET wrote: I duplicate a movie clip to show array label inside but it doesnt work It copy ok but textt isnt fill. If i write directly the mc nzme it work , but I loose dynamic. Have you got an Idea ? var wedgename:Array = Array(always, never, sometimes, yes, no, often, rarely, undecided); var thingname; for (var z:Number=0; zwedgename.length; z++) { _root.attachMovie(wedgelabel, wedgelabel+z, this.getNextHighestDepth(), {_x:(z*10)+100, _y:(z*10)+100}); var thingname = ( wedgelabel+z); trace(thingname); thingname.wedgename.text = wedgename[z]; // doesnt work why ??? wedgelabel0.wedgename.text = wedgename[z]; // trace( wedgelabel0.wedgename.text //=²always²); } Thank you ___ 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