Skip navigation
gizmorattler
Currently Being Moderated

The class or interface could not be loaded...?

Nov 30, 2009 3:18 PM

I'm doing a simple link code. I've tried many diferrent ways to do this but this error keeps comming up saying The class or interface could not be loaded...

 

home_btn.addEventListener(MouseEvent.CLICK, gotoURL);

function gotoURL(event:MouseEvent):Void

{
navigateToURL(new URLRequest("my site"));
}

 

This is the most recent method I've tried in doing this. I've tried changing the publishing settings of the document to and from Action Script 3.0- using an import command. But thats too complicated. I know this is simple... but can anyone please help?

Attachments:
 
Replies
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Nov 30, 2009 3:50 PM   in reply to gizmorattler

    1.  that is as3 so, you must publish for as3.

     

    2.  "my site"  should be replaced by "http://www.adobe.com" or something more appropriate to your needs.

     

    3.  upload your html and swf (and possibly js) files to your server and test.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Nov 30, 2009 5:58 PM   in reply to gizmorattler

    Void should be void.

     

    and you need to publish for as3 if you want that code to work.

     

    if you want to publish for as2, you need to use as2 code.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Dec 1, 2009 9:55 AM   in reply to gizmorattler

    click file/publish settings/flash and tick "permit debugging".  retest.  you'll see a line number in the error message.  there's an object in that line of code that doesn't exist when the code executes.

     

    if you can't figure out how to solve the problem with that info, paste the problematic line of code.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Dec 3, 2009 1:26 PM   in reply to gizmorattler

    if you're seeing that null object error message and that's the only code in your fla, home_btn doesn't exist.  click on the object on-stage that you think is home_btn and in the properties panel, enter home_btn.  retest.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Dec 7, 2009 3:29 PM   in reply to gizmorattler

    yes, there could other problems but you wouldn't see that null-obect message if you were correct:  that object doesn't exist when code executes that references that object.

     

    you can click file/publish settings/flash and tick "permit debugging" to see the line number of the null-object.  perhaps you have other code you haven't revealed in this forum that's causing the problem.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Dec 9, 2009 10:47 PM   in reply to gizmorattler

    you're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points