Creating eCards with Flash MX
- Creating and Sending eGreetings
- Preparing to Work
- Working with the Card Template
- Applying the Scrollbar
- Customizing the Scrollbar
- The eGreeting Interface
- Defining the Structure of the Database
- Using the LoadVars Object to Send Data
- Error Checking
- Setting Up and Testing the Email Program
- Displaying the Card for the Recipient
- Putting It All Together
Creating and Sending eGreetings
The web is about interaction, and what better way to interact than by sending a colorful, personalized greeting card to a friend? The combination of Flash's quick-downloading vector animations and its powerful new timeline-independent scripting tools makes the process of sending and receiving information to and from a server-side script easier than ever.
- Difficulty Rating: ****
- Made With: Macromedia Flash MX, Adobe Photoshop, Homesite or other HTML editor
- Final File Size: cardsender.swf (60k), 3 card files (60k each), and 3 ASP files (around 1k each)
- Modem Download Time: 10 seconds for the initial .fla, plus 10 seconds for each card when it's previewed
Development Time: 1-2 days
It Works Like This
In this project, you'll create a greeting card site using some sample Flash and ASP content I've created. You'll use a template file and built-in components to make your job easier. You will learn how to create vector-animated cards from a Flash MX template, display thumbnails of the eCards, and allow visitors to view, select, and email a card with a personalized message!
I've also built this project to be able to communicate with a database that is used to save eCard information and then retrieve it when the eCard recipient is ready to view the card.
Users entering the eGreeting site will see a selection of thumbnail graphics, each with its own View and Send buttons. Choosing View pops up a preview of the selected card with its own animation, message fields, and Close button. When the Close button is clicked, the card preview is closed and the main screen reappears.
Choosing Send takes the user to a screen where sender and recipient information can be entered. Clicking the Send button on that screen causes a record to be written to the database with the current card information, and it sends an email message to the recipient with a link to view the card. Finally, the user is sent to a response page where a message indicates whether the card was successfully emailed.
Although I used ASP for the backend coding and a Microsoft Access database, you can effectively substitute the server-side script of your choice: JSP, Perl, PHP, ColdFusion, or another, along with any ODBC-compliant database.
The eGreeting site uses multiple Flash movies to build this effect:
A template movie used to build stock greeting card movies
Three premade greeting card movies
A movie that provides the user interface and processes database and email communication
This project is broken down into several smaller tasks:
Using a predefined eCard template to create additional customized card movies
Customizing the Flash Component scrollbar
Defining the structure of the database
Enabling the Flash movie to communicate with server scripts via the LoadVars object
Testing Flash-ASP communication and the email program