Skip to main content
Known Participant
March 8, 2012
Question

1046:Type was not found or a compile-time constant:infoPanel

  • March 8, 2012
  • 1 reply
  • 1059 views

I keep getting this same error message everytime I test my project.

I have to layers, one with the images on and another containing a regular rectangle whish has been saved as a movie clip and an instance name of infoPanel, as well as a text box called txtInfo.

this is the code i have:

import flash.events.MouseEvent;

pros_library.addEventListener(MouseEvent.MOUSE_OVER, rollOverlibrary);

pros_library.addEventListener(MouseEvent.MOUSE_OUT, rollOutlibrary);

function rollOverlibrary(evt:MouseEvent):void{

    pros_library.alpha = 1;

    infoPanel.txtInfo.text =

    "This is part of the Library";

}

function rollOutlibrary(evt:MouseEvent):void{

    pros_library.alpha = 0.7;

    infoPanel.txtInfo.text = "";

}

the idea is that when the user hovers the mouse ove an image on the map, it will be highlighted and a small bit of text will appear in the box.

can anyone help please?

This topic has been closed for replies.

1 reply

sinious
Legend
March 8, 2012

Is your project targeted to actionscript 2? If so then "infoPanel" will not be available.

lee_owlsAuthor
Known Participant
March 8, 2012

No its definately set to actionscript 3, flash player 10

Ned Murphy
Legend
March 8, 2012

There is nothing wrong with your code, so it is more likely a matter of how you have the objects implimented.  Do you have more than one keyframe for the infoPanel object? Are you certain you have assigned that name to it in every keyframe?