I have what seems to be a simple task, yet I cannot seem to figure it out. I am busy creating a project in ActionScript 3, and while I am fairly fluent in ActionScript 2, I am being stumped a bit here.
I have a simple dynamic text field inside a button object. This text field has the name of txt_title. I have attached event handlers to change the alpha of the buttons when they are hovered over, however I also want to change the value of the text field within the button, when hovered over. My event listener looks like follows:
function hoverHandler(Event:MouseEvent):void{
var object:Object = Event.target;
var txt:TextField = object.txt_title;
txt.text = "TEST";
object.alpha = 1;
}
The alpha works fine, however I keep getting the following error while trying to manipulate the text field:
ReferenceError: Error #1069: Property txt_title not found on flash.display.SimpleButton and there is no default value. at main_fla::MainTimeline/hoverHandler()
Any light shed on this issue will be much appreciated,
Simon