PDA

View Full Version : Flash open link in same window



Loyen_
March 12th, 2009, 05:27 AM
Hi, I got a problem with my website http://www.fortestudios.se (http://www.fortestudios.se/). The problem aren't about html, php or webdesign itself I believe, but the problem is the flash menu. The menu is coded to open the buttons in the same window, but it doesn't, it opens the links in a new tab/window which is very annoying, I've tried to fix it by adding "_self" to the flash file, but it doesn't work at all now, it doesn't go anywhere when I press on the menu!

public function mouse_Down(e:Event):void {
trace(e.currentTarget.href);
var targetURL:URLRequest = new URLRequest(e.currentTarget.href);
navigateToURL(targetURL, "_self");
}
(it's an as file linked to the fla)

I've no idea how to fix this right now, I've tried googling but I only found as2 ways or changing the "_self" to '_self', but that doesn't work either.
I got another site that is my personal portfolio (forte is more of a schoolproject) and I tried thesame thing out there, and it worked! So I thought that maybe surftown (that is forte's server provider) has something against this or something, I dunno.

Help is appreciated. :)

graylensman
March 12th, 2009, 08:49 AM
Please post this in the ActionScript forum, before the Snarks of Random descend upon this thread with their levers of Flash knowledge.

krilEdit: Moved!!

birdwing
March 12th, 2009, 09:33 AM
"_self" is for framesets, it opens it in the frame the link is in.

try "_top" that should work.

iBall
March 16th, 2009, 11:58 PM
Hi, I got a problem with my website http://www.fortestudios.se (http://www.fortestudios.se/). The problem aren't about html, php or webdesign itself I believe, but the problem is the flash menu. The menu is coded to open the buttons in the same window, but it doesn't, it opens the links in a new tab/window which is very annoying, I've tried to fix it by adding "_self" to the flash file, but it doesn't work at all now, it doesn't go anywhere when I press on the menu!

public function mouse_Down(e:Event):void {
trace(e.currentTarget.href);
var targetURL:URLRequest = new URLRequest(e.currentTarget.href);
navigateToURL(targetURL, "_self");
}(it's an as file linked to the fla)

I've no idea how to fix this right now, I've tried googling but I only found as2 ways or changing the "_self" to '_self', but that doesn't work either.
I got another site that is my personal portfolio (forte is more of a schoolproject) and I tried thesame thing out there, and it worked! So I thought that maybe surftown (that is forte's server provider) has something against this or something, I dunno.

Help is appreciated. :)


Hi Loyen,

how did it for your front page? the awesome "enter" button
could i do the same from one site to the other site by open in the same window?

thank you :)

Loyen_
March 18th, 2009, 12:38 PM
Hi Loyen,

how did it for your front page? the awesome "enter" button
could i do the same from one site to the other site by open in the same window?

thank you :)

I forgot about that, thanks, fixed it! :D

Yes you can.