7 Replies Latest reply: Oct 31, 2008 10:35 AM by iRyFlash RSS

    Simple Button Problem

    Lena P Community Member
      I am having serious problems with creating a simple navigate to URL in Flash CS3. I am a beginner, but I really do need help. The code I have is:

      import flash.events.MouseEvent;

      myButton.addEventListener(MouseEvent.CLICK,knappKlickad);
      function knappKlickad(e:MouseEvent) {
      navigateToURL(new URLRequest(" http://www.domain.com"));
      }

      I have put this in the first timeline in my movie. When I "check syntax" everything seems great. But when I publish as AS3 I recieve the following error:

      access of undefined property myButton.

      My buttons name is "myButton". Can anyone please help me?

      / Lena P