A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: mailto: link working everywhere except Chrome

  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    49

    mailto: link working everywhere except Chrome

    In all of my AS2 and AS3 sites, the mailto: links work wonderfully in; Firefox, Safari, IE but not in Chrome. A regulare HTML mailto: will work in Chrome but not my AS2 or AS3 generated ones. In Chrome if the link is set to go to mailto:name@domain.com, Chrome then puts mailto:name@domain.com in the address bar and gives the message:

    This webpage is not available
    The webpage at mailto:name@domain.com might be temporarily down or it may have moved permanently to a new web address.
    Error code: ERR_UNKNOWN_URL_SCHEME

    If I refresh this page that is set to go to mailto:name@domain.com , then it works.

    Example here: http://villagegreenstudios.com/view11/

    The top "Email Button" is an AS3 coded Flash button.

    The middle "Email Text" is a Flash generated text link.

    The bottom "html email text" is HTML coded in the the index.html page itself.

    All 3 work in all browsers except Chrome where only the bottom one works.

    My computer has my Entourage set as the default email program. If I use the Chrome gmail plugin, the top 2 will work but then on FF and Safari the links try to open a Chrome window and this misses the point anyway as I want sites that I built for clients to have operable mailto: links in all browsers.

    The Flash version in above version is 11.4 but even in older versions, including AS2 versions, they do the same thing. I have tried various versions of the code with no luck. If it helps, here is the code used the above "Email Button" version:

    Code:
    //email button//
    function goemail(event:MouseEvent):void {
      navigateToURL(new URLRequest("mailto:name@domain.com"));
    }
    emailBtn.addEventListener(MouseEvent.CLICK,goemail);
    In AS2 I simply use:

    Code:
    on (release) {
      getURL("mailto:curt@curtbyk.com");
    }
    Help?

  2. #2
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    It's a bug with Chrome's self-managed Flash Player (aka "Pepper Flash") that seems to have cropped up recently. You can work around it by calling Javascript to perform the mailto:

    Code:
    ExternalInterface.call("function(link){window.location.href = link}", "mailto:email@domain.com");
    or

    Code:
    ExternalInterface.call("window.open", "mailto:email@domain.com"); // opens a window but the mailto works
    Pepper Flash is such a pain.
    Last edited by >flashl!ght<; 09-13-2013 at 12:18 AM.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  3. #3
    Member
    Join Date
    Sep 2006
    Posts
    49
    Thanks >flashl!ght<. I was turned onto this earlier yesterday and it works. Specifically, I used this code:

    emailBtn.addEventListener(MouseEvent.CLICK, fb);

    function fb(Event:MouseEvent):void{
    ExternalInterface.call("function(link){window.loca tion.href = link}", "mailto:email@domain.com");
    }
    The .location version doesn't open a new window which is nice.

    I didn't know about Pepper Flash until yesterday and now I have something new to hate.

    Thanks for your response.

  4. #4
    Junior Member
    Join Date
    May 2015
    Posts
    1

    html mailto

    Try this HTML mailto samples

    Robert

  5. #5
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Me hate Pepper Flash too
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center