swf hyperlinked self in actionscript 3

  • Numetale
  • Born
  • Born
  • Numetale
  • Posts: 1

Post 3+ Months Ago

Hello, to see if I can help, but look not understand why I have this problem as specifically:

I have a logo in the header of a website (klancstudio (DOT) com) that is supposed to lead to the main page. It is a swf created with Flash and ActionScript 3.

The code I have is:

ACTIONSCRIPT Code: [ Select ]
BotonInstancia.addEventListener (MouseEvent. CLICK, Hyperlink)
Hyperlink function (e: MouseEvent): void
var url: String = "http:// (W) klancstudio (DOT) com";
var iraURL: URLRequest = new URLRequest (url);
navigateToURL (iraURL, "self");
catch (e: Error)
trace ("Failed!")
BotonInstancia. buttonMode = true;
  1. BotonInstancia.addEventListener (MouseEvent. CLICK, Hyperlink)
  3. Hyperlink function (e: MouseEvent): void
  4. {
  5. var url: String = "http:// (W) klancstudio (DOT) com";
  6. var iraURL: URLRequest = new URLRequest (url);
  7. try
  8. {
  9. navigateToURL (iraURL, "self");
  10. }
  11. catch (e: Error)
  12. {
  13. trace ("Failed!")
  14. }
  15. }
  17. BotonInstancia. buttonMode = true;

"Self" does not underscore the thing done, was a suggestion I read in a forum through which I went as much to what I want. If I put "_self" direct link does not work, if I put "_blank" works but always opens new browser and do not want that.

The problem is that when you open the first time the web and click on the logo opens a window / tab new addition (which is not sought and does not understand why) but in this new window / tab you Click again on the logo and it works well and reload the page on the same browser.

If anyone has any suggestions will be very grateful.

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1252
  • Loc: Ro

Post 3+ Months Ago

yea, i have a sugestion.
When everything else fails, use javascript (of course if you can hanlde it) :)
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23469
  • Loc: Woodbridge VA

Post 3+ Months Ago

Numetale wrote:

The code I have is:

navigateToURL (iraURL, "self");

In your code you did not use "_self" you used "self" without the preceeding underscore. Add in the underscore and it should work. If not try "_parent"

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.