• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Actionscript 3 and _self links

Guest
May 10, 2012 May 10, 2012

Copy link to clipboard

Copied

Hi Guys,

I'm trying to get a page to load in the same tab, instead of creating a new tab (like HTML target=""_self" instead of _blank)

I've tried a few different things I've found on different forums, nothign seems to be working though

This is what I'm trying..

function gotoManitoba(event:MouseEvent):void

{

var targetURL:URLRequest = new URLRequest("http://mydomain.com/flash/?p=44");

navigateToURL(targetURL, "_self");

}

MB.addEventListener(MouseEvent.CLICK, gotoManitoba);

It doesn't return an error, but the link doesn't work at all as long as the "_self" is in there.

TOPICS
ActionScript

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2012 May 10, 2012

Copy link to clipboard

Copied

Are you testing with a browser?  Are you testing on a server?  What you have done is correct, but sometimes testing needs to involve the browser/server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 10, 2012 May 10, 2012

Copy link to clipboard

Copied

Yes, I am testing it in a browser on my linux server. I've even tried clearing my cache several times.. 😕

I'm at a loss with this one.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 10, 2012 May 10, 2012

Copy link to clipboard

Copied

Try clearing your cache - just in case it is still pulling up an old version that didn't have the "_self" in it

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 11, 2012 May 11, 2012

Copy link to clipboard

Copied

yes, as I said in my earlier post, I've cleared my cache a few times already, I also tried it in a few different browsers. It seems to always act as _blank

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 18, 2012 May 18, 2012

Copy link to clipboard

Copied

LATEST

I'm running into the same problem. I have been trying to figure it out for the last three days, and I still haven't come across a solution. I am doing everything correct while watching instruction videos, but again, the _self tag doesn't work and acts as if it's nonclickable, where as _blank works to open the link in a new tab. But I am trying to open the flash button in the same tab.

If anyone has a solution to this problem, I would greatly appreciate it.

I have googled and searched through multiple forums, but all seem to say the same thing, and I still haven't figured out how to get it to work.

This is the code snippet I am using:

inv_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage(event:MouseEvent):void

{

          navigateToURL(new URLRequest("http://www.mydomain.com/"), "_self");

}

_blank tag works, but not _self.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines