Help with UILoader and images

Hey all,

I have a UILoader loading an image, and I’m making that into a button. I’ve added a addEventListener so that when you click it fires an event

The event tries to redraw the button with a new image… so far ZERO luck.


private var dataLoader:UILoader = new UILoader;
dataLoader.source = "assets/off-tab.png";
dataLoader.mouseEnabled = true;
dataLoader.height = 23;
dataLoader.width = 121;
dataLoader.addEventListener(MouseEvent.MOUSE_DOWN, clickMe);

private function clickMe(evt:MouseEvent):void{

         evt.target.source = "assets/on-tab.png";
         
      }


This is the error I get:

Error #1056: Cannot create property source on flash.display.Loader.

Thoughts? TIA

C