A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [MX04] Email Action PLS Help!

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    14

    [MX04] Email Action PLS Help!

    I'm trying to use a button to launch the viewers normal email program to send an email from the site I'm creating...in HTML this would be "mailto:xxxx@abcdef.com"

    I've tried that in the actions but it doesan't work?

    Can you pls let me know what the correct script would be?

    Many thanks!!!!

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    hitting [F1] in flash does wonders when you want to search for things.. also searching here for topics that have been asked/answered a million times would have saved you the trouble of posting and waiting for help.

    PHP Code:
    myBtn_btn.onRelease = function(){
     
    getURL("mailto:you@somedomain.com");
    }; 

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Posts
    14

    Doesn't work????

    Thanks for your reply..unfortunayely I must be doing something wrong still...I put in your code and it still doesn't launch outlook...

    On the stage I right click the button which is named contactBTN

    I place your code in there and nothing still

    myBtn_btn.onRelease = function(){
    getURL("mailto:you@somedomain.com");
    };

    Am I supposed to replace myBtn_btn in the code with the name of my button so it reads like this:

    contactBTN.onRelease = function(){
    getURL("mailto:you@somedomain.com");
    };

    I tried that and that doesn't work???

    Sorry but I'm lost can you reply with some help pls

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    you are correct, in that it shoudl have YOUR buttons instance name..

    but more importantly.. that code goes in the MAIN TIME LINE (frame).. and NOT on your button it is NOT suggested that youplace code directly ON your objects..as it makes it harder to find and edit later on.

    However if you DO want to put th code directly on the button you woudl need to code it with this syntax.

    PHP Code:
    on(press){
        
    getURL("mailto:you@somedomain.com");
    }; 

  5. #5
    Junior Member
    Join Date
    Oct 2003
    Posts
    14

    Still doesn't work

    Whispers...do you mind if I attached a sample fla file...I tried the code you gave me and it still doesn't work...obviously I'm lost and could use your help...thanks...I'll attache it to the next response after I hear back from if

    Thanks a lot

  6. #6
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    as long as the file is compatible with F8.. and I can open it..sure.

    actually heres an example:

    (attached)

    I have BOTH versions to show you

    the first button (button1) has an instance of (yes, you guessed it, button1).. and the code to control that button is in the first frame of the ACTIONS layer.

    the second button (yep, button2) has the code DIRECTLY applied to it.. so you need to select it, and look at the code in the actions panel..

    tis is NOT the recommended way however.
    Attached Files Attached Files

  7. #7
    Junior Member
    Join Date
    Oct 2003
    Posts
    14

    Email Button Attached

    I can't open your fla file...I'm using Flash MX2004...and my code is in Version 2 action script...

    I created a button and put the code you reccommended in and like I said it doesn't work...attached is the fls, swf and html file so you can see it doesn't work and hopefully change it so it does...thanks whispers!!!

    See attached!!!
    Attached Files Attached Files

  8. #8
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    woops..my bad.. saved as MX_04 now.. shoudl work.. I'll check out your .fla now.
    Attached Files Attached Files

  9. #9
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Sometimes it doesn't work because you need an extra property:

    myBtn.onRelease = Function () {
    getURL("mailto:you@somedomain.com", _self);
    };
    But what Whispers said should work, too.

    -Sportzguy933

  10. #10

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