• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

learning: error 1061

Guest
Feb 03, 2009 Feb 03, 2009

Copy link to clipboard

Copied

Hey,
Just learning flash action script 3

all i want to do is add a link to a URL

i have converted my graphic into a button named myButton

here is my code:
var link:URLRequest = new URLRequest (" http://www.bikes.com.au/g/37231/interstate-delivery-charges.html");

myButton.addEventListener(MouseEvent.CLICK, linktourl);

function linktourl(event:MouseEvent):void {

navigateToURL(link);

}


____________

and i get error 1061: call to possibly undefined method addEventListener through a reference with a static type class


if anybody could help that would be fantastic
TOPICS
ActionScript

Views

304

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 03, 2009 Feb 03, 2009

Copy link to clipboard

Copied

is myButton a class name?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 03, 2009 Feb 03, 2009

Copy link to clipboard

Copied

Nope,
myButton is the name of my button.
i dont really understand it so i'm hoping somebody can help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 03, 2009 Feb 03, 2009

Copy link to clipboard

Copied

LATEST
Nope,
myButton is the name of my button.
i dont really understand it so i'm hoping somebody can help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines