Hi!
I’m kinda new with Flash but I’ve managed to create a menu for a homepage. Now when I click on one of the menu links - the page opens up in a new window.
But I don’t want that at all.
I want the page to open up in another frame called mainframe.
I’ve tried a number of things already; changing from “mainframe” to “_mainframe” and back, trippelchecking that the frames name really is mainframe so there’s no typo. I’ve also changed the name of the mainframe both in the htmlfile and the code but that didn’t work either.
Please help!
Here’s my code:
[LIST=1]
[][COLOR=#0000ff]var[/COLOR] linkabout:URLRequest = [COLOR=#0000ff]new[/COLOR] URLRequestCOLOR=#000000[/COLOR];
[][COLOR=#808080]//…//[/COLOR]
[][COLOR=#0000ff]function[/COLOR] aboutClick[COLOR=#000000]([/COLOR]event: MouseEvent[COLOR=#000000])[/COLOR]:[COLOR=#0000ff]void[/COLOR]
[][COLOR=#000000]{[/COLOR]
[] [COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR]subDown[COLOR=#000000][[/COLOR][COLOR=#0000ff]1[/COLOR][COLOR=#000000]][/COLOR] == [COLOR=#0000ff]true[/COLOR][COLOR=#000000])[/COLOR]
[] [COLOR=#000000]{[/COLOR]
[] [COLOR=#808080]//true = submenyn är nere o ska upp[/COLOR]
[] subAbout_mc.[COLOR=#0000ff]gotoAndPlay[/COLOR]COLOR=#000000[/COLOR];
[] [COLOR=#0000ff]stage[/COLOR].[COLOR=#0000ff]addEventListener[/COLOR][COLOR=#000000]([/COLOR]Event.[COLOR=#0000ff]ENTER_FRAME[/COLOR], subUpAbout[COLOR=#000000])[/COLOR];
[] [COLOR=#000000]}[/COLOR]
[] [COLOR=#0000ff]else[/COLOR]
[] [COLOR=#000000]{[/COLOR]
[] [COLOR=#808080]//false = submenyn är uppe o ska ner[/COLOR]
[] navigateToURL[COLOR=#000000]([/COLOR]linkAbout, [COLOR=#009900]"_mainframe"[/COLOR][COLOR=#000000])[/COLOR];
[] btnHit[COLOR=#000000][[/COLOR][COLOR=#0000ff]1[/COLOR][COLOR=#000000]][/COLOR] = [COLOR=#0000ff]true[/COLOR]; [COLOR=#808080]//visar att det är denna sub som ska ner[/COLOR]
[] checkSubDownCOLOR=#000000[/COLOR];
[] [COLOR=#000000]}[/COLOR]
[][COLOR=#000000]}[/COLOR]
[/LIST]