I am trying to add a link on an Image
- by firemonkey
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>