Skip to main content
December 14, 2009
Question

extra browser window on email link

  • December 14, 2009
  • 1 reply
  • 1666 views

Good morning,

Would anyone be kind enough to look at the following as3 code and tell me why I am getting an extra blank browser window named "untitled" behind

the main one, which pops up fine. I did test it on my remote server and it still had the same problem as from within flash itself ?

Thank you,

fred@fredhughesdesign.com

var emailLink:URLRequest = new URLRequest("mailto:law@optonline.net");

email_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(MouseEvent):void

{

navigateToURL(emailLink);

}

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
December 14, 2009

use:


var emailLink:URLRequest = new URLRequest("mailto:law@optonline.net");

email_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(MouseEvent):void

{

navigateToURL(emailLink,"_self");

}

December 14, 2009

I truly appreciate your quick response to try and help me out kglad !

I did just try that extra bit of code and double checked it a few

times to no avail ? The extra blank browser window still shows

up behind the good one. 

If you could be kind enough to double check me on this it would

be great.

var emailLink:URLRequest = new

URLRequest("mailto:law@optonline.net");

email_btn.addEventListener(MouseEvent.CLICK, onClick);

function onClick(MouseEvent):void

{

navigateToURL(emailLink,"_self");

}

//the "_self" is green on my screen if that helps you any ?

//I tried it within flash and not on a remote server.

//Ned (a very helpful man from this forum) told me it is a

  quirk from within flash but should work on a remote server.

Thanks again,

Fred...

kglad
Community Expert
Community Expert
December 14, 2009

publish an html and swf file from the fla that contains that code.  open the html file in a browser and click your button.  any problem?