Skip to main content
June 8, 2008
Question

want to make a button that when clicked launches email

  • June 8, 2008
  • 4 replies
  • 386 views
helpp i'm trying to make a button that when someone clicks it it will open up their email and have the given address in the address box already...i cant find a way to do this in actionscript 3
This topic has been closed for replies.

4 replies

June 9, 2008
no no thatas not the problem like....its doing what its supposed to do but its also opening a blank firebox window...meaning something in the original code is calling that window to open...which part would that be?
Damon Edwards
Inspiring
June 9, 2008
shouldn't need to but

navigateToURL(request);

to

navigateToURL(request, "_self");


edit: spelling
June 9, 2008
thank you so much this code works well except for the fact that while it opens up my email provider and all that it also opens up a blank window in my firefox....what part of the code makes that happen how can i remove that?
Ned Murphy
Legend
June 9, 2008
function sendEmail(event:MouseEvent):void {
var url:String = "mailto:someone@somewhere.com";
var request:URLRequest = new URLRequest(url);
navigateToURL(request);
}

emailButton.addEventListener(MouseEvent.CLICK, sendEmail);