I am trying to add a link on an Image

Posted by firemonkey on Stack Overflow See other posts from Stack Overflow or by firemonkey
Published on 2010-04-14T23:36:00Z Indexed on 2010/04/14 23:43 UTC
Read the original article Hit count: 236

Filed under:
|

Hi,

I am trying to add a link to an image using ActionScript. I do not see the link no matter what. Below is my code, Can you please suggest what am I doing wrong.

  <?xml version="1.0" encoding="utf-8"?>
<mx:Application creationComplete="application1_creationCompleteHandler(event)" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
    <mx:Script>
        <![CDATA[
            import mx.controls.Button;
            import mx.controls.Image;
            import mx.events.FlexEvent;

            protected function application1_creationCompleteHandler(event:FlexEvent):void
            {               
                var but:Button = new Button();
                but.label = "BUT";
                uic.addChild(but);
                      var dollLoader:Loader=new Loader();  
                                dollLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dollCompleteHandler);  
                                var dollRequest:URLRequest =  new URLRequest("http://www.google.com/intl/en_ALL/images/logo.gif");  
                                dollLoader.load(dollRequest);  
                                uic.addChild(dollLoader);  

                }

            private function dollCompleteHandler(event:Event):void   
                        {  


                        }  

        ]]>
    </mx:Script>

    <mx:UIComponent id="uic" width="100%" height="100%">

    </mx:UIComponent>

</mx:Application>

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript-3