Hello, I'm a noob in flex. I have no training on it but I try to learn it as much as I could.
I think my problem is simple to you guys. I have this in my main.mxml code <mx:Image x="204" y="7" source="images/new.gif" visible="false" id="imgNewMessage"/> Now, if I reference it in an action script file like so... imgNewMessage.visible=false; it works fine. But if I try to do that in a custom control, like this package mycontrol.containers { import mx.controls.Alert; import flash.display.DisplayObject; import flash.events.Event; import flash.events.MouseEvent; import flash.events.TimerEvent; import flash.utils.Timer; . . . public function doSomething():void { imgNewMessage.visible=false; } } I'm getting an error. Its like it does'nt know imgNewMessage. How can I reference it? I thought components are accessible globally. Hope you guys can help. Thanks in advance.