AS3 stupid question
- Started
- Last post
- 7 Responses
- alicetheblue
Am trying to open JUST an email window - but the browser window opens as well ...helllllllp!
//1.Button event listener
info_btn.addEventListener(MouseE... mailto);//2.The mailto function open up email application to send email.
function mailto(event:MouseEvent):void
{
var email:URLRequest = new URLRequest("mailto:info@mydomain...
navigateToURL(email, "_blank");
}
- acescence0
target _self instead of _blank
- alicetheblue0
still opens browser window as well ......
var email:URLRequest = new URLRequest("mailto:info@mydomain...
navigateToURL(email, "_self");- reads - mydomaindotcom -end of backet, semicolonalicetheblue
- acescence0
in every browser, or just IE?
- alicetheblue0
trying first in safari -
(even a slightly different code at Kirupa site gives me the same outcome - so i think its a safari thing. )I think I'll have to redo in AS2 ...... :(
- acescence0
strange as a c/p of your code works fine for me in safari and ff. IE is the only one that's a bit stubborn, for that a javascript call will work...
function mailto( event:MouseEvent ):void
{
ExternalInterface.call( "window.location.assign", "mailto:email@domain.com" );
}
- alicetheblue0
yes... it works in safari now for me, too
(this is such a steep learning code for me - as an art director lol)–So –
{
External ...
}– would that replace –
{
var email ...
navigate...
{thnx
- alicetheblue0
oh thank you!!!!