Search : in
By :

Buttons in ActionScript 3.0

Last answer on Feb 19, 2009 4:36:35 pm GMT Ieva, on Feb 18, 2009 4:14:07 pm GMT 
 Report this message to moderators

Hello,
I'm trying to make my buttons clickable in flash CS4 ActionScript 3.0, but for some reason it keeps giving me the error - 1120: Access of undefined property btnHome. I have set it ups as - Instance of: btnHome and name home. What am I doing wrong? Please help!

My code looks like this

function goHome(event:MouseEvent):void
{var targetURL:URLRequest = new
URLRequest("http://www.spintopdesigns.com/");
navigateToURL(targetURL);}
btnHome.addEventListener(MouseEvent.CLICK,goHome);

Configuration: Mac OS X
Safari 523.12

Best answers for « Buttons in ActionScript 3.0 » in :
IPhone: Forcing an application to quit (firmware 3) ShowiPhone: Forcing an application to quit (firmware 3) Issue Solution Issue With the earlier versions of the iPhone firmware, you normally hold the HOME button (center button down) to force the current application to quit. With the...
System requirements for Sims 3 ShowSystem requirements for Sims 3 System Requirements for MAC The system requirements for PC Patch If you are unable to run SIM 3, it may be due to the fact that the configuration of your PC isn’t powerful enough or that your...
Identify the version of Pixel Shader of your graphics card ShowIdentify the version of Pixel Shader of your graphics card Pixel Shader 1.0/1.1 (DX 8.0) Pixel Shader 1.3 (DX 8.0a) Pixel Shader 1.4 (DX 8.1) Pixel Shader 2.0 (DX 9.0) Pixel Shader 2.0a (DX 9.0a) Pixel Shader 2.0b (DX 9.0b) Pixel Shader...
Download Windows Installer ShowMicrosoft WindowsIinstaller is a service of installation and application configuration, allowing to manage the applications containing the MSI extension MSI. Windows Installer 3.1 is a secondary update of Windows Installer 3.0 published in...
Download .NET Framework ShowMicrosoft .NET Framework 3.5 contains new features which have been built upon .NET Framework 2.0 and 3.0, and includes .NET Framework 2.0 service pack 1 and .NET Framework 3.0 service pack 1. Microsoft .NET Framework 3.5 includes: - ASP .NET AJAX...

1

pro-genius, on Feb 19, 2009 4:20:39 pm GMT

Hmmm really i don't know. The code looks good to me :S

Reply to pro-genius

2

 Ieva, on Feb 19, 2009 4:36:35 pm GMT
  • +1

Thanks, I figured it out, for some reason I used instance of.... and not instance name, all I had to do is change btnHome.addEventListener(MouseEvent.CLICK,goHome); to -
home.addEventListener(MouseEvent.CLICK,goHome);

Thanks for looking into that and trying to help me.

Reply to Ieva