Re: [Flashcoders] AS3 - A simple questions

2008-06-05 Thread EECOLOR
I would recommend using event.currentTarget instead of event.target at all times. the event.currentTarget property contains a reference to the instance at which you registered the event listener. event.target refers to the class that dispatches the event. In this case there is no difference

Re: [Flashcoders] AS3 - A simple questions

2008-06-05 Thread Viktor Hesselbom
I use event.target in the current application I'm developing. It's nice in MouseEvents for determing what is currently under the mouse and not what dispatches the event. On Thu, 05 Jun 2008 14:17:43 +0200, EECOLOR [EMAIL PROTECTED] wrote: I would recommend using event.currentTarget instead

[Flashcoders] AS3 - A simple questions

2008-06-03 Thread SJM - Flash
Hi Guys a simple questions for you Basically I want to produce similar code that creates 3 TextFields and when clicked (or focused) they need to say Hi I'm TextField [num], I would like to avoid putting the TextFields in MovieClips if possible. // // Creates 3 new MovieClips and adds a

Re: [Flashcoders] AS3 - A simple questions

2008-06-03 Thread Rich Shupe
for (var i:int = 0; i 3; i++) { var txtFld:TextField = new TextField(); txtFld.name = TextField + i; txtFld.border = true; txtFld.x = i*120; addChild(txtFld); txtFld.addEventListener(MouseEvent.CLICK, onClick, false, 0, true); } function onClick(evt:Event):void {