0

I get this error

 PlayButton.as: Error: Can not resolve a multiname reference unambiguously.      
 PlayButton_PlayHoverImg (from PlayButton_PlayHoverImg.as) and 
 buttons:PlayButton_PlayHoverImg (from buttons\PlayButton_PlayHoverImg.as) are available.

I have a project folder with buttons folder in it. I store all my button related classes in my buttons folder. However I get an ambiguity error.

I am emebding an image in the PlayButton.as class

    [Embed(source = "../../resources/images/play3.png", mimeType = "image/png")]
    private var PlayHoverImg:Class;
    private var playHoverImpl:Bitmap = new PlayHoverImg();

So it tells me there is some problem with the image I embed. What could be the problem?

Vlad
  • 2,739
  • 7
  • 49
  • 100
  • 2
    Try resetting the compiler. If that doesn't work, are you 100% confident you haven't named another embed PlayHoverImg:Class? – alecmce Sep 21 '11 at 11:51
  • Yes I am 100% there is no other PlayHoverImg class. How can I reset the comipler? – Vlad Sep 21 '11 at 11:56
  • Maybe you have a backup somewhere and the compiler can see that and is mistaking it for a copy. Try to rename it, does the error go away? There is also the offchance some other error is setting this off, I remember in the older days the compiler wasnt very good at identifying the errors. – eLouai Sep 22 '11 at 15:44

2 Answers2

2

The error simply stated is 'PlayButton_PlayHoverImg' is defined by 2 different classes. Either rename it or cast it to remove the ambiguity.

eLouai
  • 696
  • 1
  • 8
  • 21
0

You may try to clean current project to fix this error.

FalconIA
  • 91
  • 1
  • 7