Hello,

 

I’m trying to get a TextEvent.LINK working in Flex Builder 2 beta 3.  The following worked in beta 2 and it would trace out the event “myEvent1”, or “myEvent2” when each was clicked. Now nothing is traced out.  Any ideas?  Thanks.

 

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" width="691" height="528" creationComplete="init()">

            <mx:Script>

                        <![CDATA[

                                    import flash.display.Sprite;

                                    import flash.text.TextField;

                                    import flash.events.*;

                                    import mx.core.*;

                                    import mx.utils.*;

                                    import mx.managers.DragManager;

                                     import mx.events.DragEvent;

                                     import mx.controls.Alert;

                                    // import flash.util.trace;

                                    import mx.collections.*;

                                   

                                    public function init():void {

                                                _linkText.addEventListener(TextEvent.LINK, myEvent);

                                    }

                                   

                                    public function myEvent(e:TextEvent):void {

                                                trace(e.text);

                                               

                                                // flash.util.trace(mx.utils.ObjectUtil.toString(e));

                                    }

                        ]]>

            </mx:Script>

 

 

<mx:Text id="_linkText" width="365" height="100%" color="black" toolTip="click to remove" selectable="false">

            <mx:htmlText>

                        <![CDATA[<font color="#0000FF"><a href="" hoo</u></a></font> , <font color="#0000FF"><a href="" hoo</u></a></font> , another]]>

            </mx:htmlText>

</mx:Text>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to