Hi I have button (instance name-test1) on main time line. and following as on class file (main.as) works fine.
if(String(_xml.setup.buttons.music.@state) == “enabled”){
test1.buttonMode = true;
test1.mouseEnabled = true;
test1.addEventListener(MouseEvent.CLICK, myBtnClicked);
function myBtnClicked(e:MouseEvent):void {
var url:String = “http://www.example.com/”;
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, ‘_blank’);
} catch (e:Error) {
trace(“Error occurred!”);
}
}
Now for some reason I need to place the symbol inside another symbol2 (symbol2 is on maintimeline) but code is not working anymore and getting error
1120: Access of undefined property test1.
Thanks…needs to fix that