A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11249 Flash Movies | 9 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: kyo
» Title: building estructure
» Description: explosion of building estructure made by swift3D
» More by kyo


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 6393 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Webdancer's Web Site
» Comments: Webdancer's, an artistic adventure in 3d graphicsbr>


Random Links | Add your own Flash Related Links
Flash Tutorials 1197 Tutorials 7 New Tutorials Added!
What's New | Top100

» Let Photos Show Your Happy Family this Christmas and Upload YouTube
» PowerPoint show to DVD slide show--- PPS to DVD
» How to burn FLV to DVD for Mac
» How to Create Christmas Flash Greeting Ecard with photos and music
» Getting Started In Flash
» How to convert FLV video to MP3 audio for Mac OS
» Join flv videos together with just a few clicks
» How to convert flv file to avi for mac os x
» How to Create Christmas Flash Greeting eCard without programming skills
» Unknown Tag: Title10
Random Tutorial | Add Site

bbm.netBBM.net is designed to save you time and deliver the highest quality royalty-free music for your multimedia projects. Features include: over 450 Music Loop Packages from some of the best composers in the business, our music search engine to speed your selection process, alternate music versions & bonus sounds to use for rollovers or transitions, free technical support and free consulting.

Click here for details »

Senior Web Designer
Aquent
US-GA-Atlanta

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Dynamic_Content

Categories Sending Customized Flash E-cards
Author: Jeffrey F. Hill | Website: http://www.flash-db.com |

 
Page 3
«prev 1 2 3 4 5 6 7 8 9 next»

Part 1 - Setting up the Main Flash Movie

The main Flash movie (Ecards.fla) is your base of operations. This file allows the user to select the e-card they want to send, then allows them to enter custom text which will be sent along with the e-card when they send it to a friend or anyone else they want to. By opening up the Flash Fla file and going over it first you will have a much better understanding of the part that I'm going to go over next. This part of the tutorial is not really necessary if you already have a good working knowledge of Flash 5.

The fla file contains a movie clip named 'ECards'. This movie clip has 5 frames, each frame contains an image of the Ecard you want to send out. This movie clip is used 5 times (1 time for each e-card that you want to allow users to select from). Their are 5 different instances of the movie clip 'ECards', each instance is used to display a different frame of the movie clip - which corresponds to a different image of an e-card. Setting instance Names.

The first image to the right demonstrates this point. This is the first instance of the movie clip 'ECards', their are 5 other instances with instance names of Ecard2, Ecard3, Ecard4, Ecard5, etc. You should be able to easily change this part or add new ones to the list.

In the first frame of the layer 'Actions' their are a couple of lines of actionscript which tell each e-card what frame to display. For example Ecard4 is told to gotoAndStop at frame 4. On frame 4 of their is a preview image of Ecard 4. These commands are shown in the second image to the left. They can also be found in the fla file.

Over each Movie Clip their is a button. This button allows users to select which card they want to send by clicking on it. The buttons contain the following actionscript.

on (release) {
 gotoAndStop (2);
 EcardSelect = "1";
}

This tells the main movie to gotoAndStop at frame 2. And also sets the variable EcardSelect equal to 1. The actionscript on the button over the second e-card would be exactly the same except the variable EcardSelect would be set equal to 2. The EcardSelect variable will be used throughout.

This brings us to Frame 2 of the main Ecard Movie. This frame contains the actionscript that sets up the preview image of the card that was chosen and also the actionscript that checks the custom text fields and post's that information to the PHP script that sends the card.

In the second frame of the layer 'Actions' their is a line of actionscript as follows:

_root.EcardPreview.gotoAndStop(EcardSelect);

The 'ECards' Movie clip is again used, only this time it is given an instance name of 'EcardPreview'. This line of actionscript tells this instance of ECards to go to and stop at the frame that corresponds to the variable EcardSelect - that was set when the user clicked on a specific E-card.


Their are a number of text fields in this frame. They are all input text fields. Make sure that you do not have the 'html' checkbox checked off for these text boxes.

The text fields are given the variable names: ToName, ToEmail, FromName, FromEmail, Greeting, and IntroMessage. An example of the text box with the variable name 'ToName' is given to the right. One thing you may want to do is set the Max Chars limit. In this case the limit was set to 70 Characters. In the case of the IntroMessage text you should try to set a limit so that the text is not cut off in your greeting card when somebody sends it.

The last part of setting up the main 'Ecards.fla' file includes sending the custom information to a script which then processes that information.

On the 'Click here to send e-card' button you will find the following text:

on (release) {
 if (ToName eq "") {
 _root.Status = "Please enter the Name of the person your sending this to";
 } else if (FromName eq "") {
 _root.Status = "Please enter your Name";
 } else if (ToEmail eq "") {
 _root.Status = "Please enter the Email address your sending this to";
 } else if (FromEmail eq "") {
 _root.Status = "Please enter your email address";
 } else if (Greeting eq "") {
 _root.Status = "Please enter a greeting message";
 } else if (IntroMessage eq "") {
 _root.Status = "Please enter a Intro Message";
 } else {
 gotoAndStop (3);
 _root.Status = "Sending Ecard - Please Hold";
 loadVariablesNum ("SendEcard.php", 0, "POST");
 }
}

The first couple if-else statements just check to make sure that the user filled all the fields out. Then if they did it tells the main movie to go to and stop at the 3rd frame of the movie - where the user will see a success 'the message has been sent' notification. Also the loadVariablesNum command post's all of the variables in the movie to a script which later processes the results.

«prev 1 2 3 4 5 6 7 8 9 next»

» Level Advanced

Added: : 2001-12-04
Rating: 8.56 Votes: 118
Hits: 5171
» Author
Jeffrey Hill is a freelance web developer from Boulder, Colorado. He specializes in creating and developing dynamic database driven Flash content. Being a recent graduate of the University of Colorado - he somehow finds time to write these tutorials.
» Download
Download the files used in this tutorial.
Download (426 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES