Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

incompatible override - stack overflow error

Status
Not open for further replies.

zdvdla

Technical User
Apr 28, 2007
18
US
can anybody explain this in newbe terms?

Btn_GemStones_mc.buttonMode = true;
Btn_GemStones_mc.addEventListener (MouseEvent.ROLL_OVER, HomeSparkGem);
Btn_GemStones_mc.addEventListener (MouseEvent.ROLL_OUT, HomeSparkClearGem);






Btn_GemStones_mc.addEventListener (MouseEvent.CLICK, link_gem);

var link_gem:URLRequest = new URLRequest("
function link_gem(event:MouseEvent):void
{
navigateToURL(link_gem);
}

I get

1023: Incompatible override.
1021: Duplicate function definition.
 
You get those errors because you are doing just that - you are defining [tt]link_gem[/tt] twice as [tt]function[/tt] and as [tt]URLRequest[/tt]. You are neither allowed to define a function twice, nor override a [tt]function[/tt] with something else such as [tt]URLRequest[/tt]. If you just change the name of one of them to something else, it will work without error.

Kenneth Kawamoto
 
thanks Ken..wow I fell really stupid...thanks for not pointing out how dumb this question was..just get stuck looking for deep answers and and up forgetting the obvious..
thanks again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top