mailto doesn't work with AS3

Go To


So this what I use :

btnContactUs.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage(event:MouseEvent):void

navigateToURL(new URLRequest(""), "_blank");

I also tried with "_self" and it doesn't do anything ( I know the button work ).

You need to know that It's not an application embbeded in an html page. It's a local .swf that I run ( Ctrl + enter (with the .fla) and it doesn't work ).

2012-04-04 19:38
by Louis
hmm, that should work fine. Have you tested it on a server? My guess is the global security settings for flash is making it not wor - Ronnie 2012-04-04 19:45
no not on a server, so how do I change this security settings - Louis 2012-04-04 19:49 ...add your drive or folder to to that list and see if that help - Ronnie 2012-04-04 19:53
not working :/ S - Louis 2012-04-04 20:02
have you tried the link outside the flash IDE? like open the swf or throw it in a browseR? I tried it in my flash IDE and it opened gmail in chrome which is my default mai - Ronnie 2012-04-04 20:09
open the swf doesnt work but if i throw it on firefox it wor - Louis 2012-04-04 20:11
yeah it work on firefox but I don't have outlook that why it doesnt work. But how can I make it say ("doesn't work please install outlook" if he doesnt have - Louis 2012-04-04 20:14
Have you set your browser's default e-mail program? If you have none set then likely it will not do anything. For FireFox, - ToddBFisher 2012-04-04 20:25
it work in firefox - Louis 2012-04-04 20:45
whoa, don't ever make anyone install outloo - Ronnie 2012-04-04 21:17
^^ :)))))))))))))))) - Louis 2012-04-04 21:35


    navigateToURL(new URLRequest(""), "_blank");

works whether you have it set to access network or local files only, I'm not sure why you can't get it to work, have you tried a simple trace for the fl_ClickToGoToWebPage function to make sure it is called at all?

2012-04-04 20:19
by Daniel
Yes it is calle - Louis 2012-04-04 20:43


We can use following code with ExternalInterface where 'url' is mailto: link URL. i.e.

//Mailto Links from Flash"function(link){var wEmail =, '_blank'); setTimeout(function(){ wEmail.close();}, 70);}", url);
2015-07-28 18:58
by Kuldip D Gandhi