Skip to main content
National87
Participant
November 8, 2015
Answered

1061 Call to a possibly undefined method addEventListener through a reference with static type Class

  • November 8, 2015
  • 1 reply
  • 636 views

import flash.events.MouseEvent;

import flash.net.URLRequest;

import flash.net.navigateToURL;

var getContactPage:URLRequest = new URLRequest ("http://www.mycontacturl.html")

Contact.addEventListener(MouseEvent.CLICK,ContactClick);

function ContactClick(event:MouseEvent): void {

    navigateToURL (getContactPage);

   

}

Any help would be appreciated

Thank you

This topic has been closed for replies.
Correct answer Ned Murphy

The message makes it sound like Contact is the name of a class, not an instance name of an object.  Make sure you are not naming the object with a class name.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
November 8, 2015

The message makes it sound like Contact is the name of a class, not an instance name of an object.  Make sure you are not naming the object with a class name.