Flash tutorials
Home 3D (2) Actionscripting (65) Animation (100) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (52) Text Effects (38)

E-mail button in flash

2.8.2007, 0:47    Total views: 48065

Using this tutorial, you will see how to create e-mail button in flash using a little action script code. You can use this button for any web site, and on that way, enable every users to sent e-mail. Let's go!



Step 1

Open a new flash document.



Step 2


Create any button which you like to use for this example. My button looks like this:



Step 3

Take the Selection Tool (V) and click once on the button to select it. Then, go to the Properties Panel (Ctrl+F3) below the stage. On the left side, You will find the Instance name input field there. Call this button "button". See the picture below.



Step 4

Create a new layer above the layer 1 and name it action.

Step 5

Click on the first frame of layer action and go to the Action Script Panel (F9). Then, enter this code inside the actions panel:

var address="example@mail.com";
var caption="Hello";
var message="Hey, how are you? I'm in New York. See ya next week! Bye!"; button.onRelease= function() {
getURL("mailto:"+address+"?Subject=" + caption + "&body=" + message);
}

Test your button, we're done!

Download source file (.fla)

Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 221533

2. Water effect
Total views: 166040

3. Photo slide show
Total views: 153638

4. High-tech city animation
Total views: 151459

5. Special Picture Effect
Total views: 146246

Related links