Recent News Features on Flazoom.com
  1. Running from Bears - 11/20/2002
  2. Flash: The User's Best Friend? - 06/18/2002
  3. What would Wal-Mart Do? - 10/29/2001
  4. Are You Designing For Your Eyes Only? - 09/25/2001
  5. The Keys to Improving Flash Usability - 08/03/2001
  6. Macromedia Design a Site for Usability Contest - 04/10/2001
  7. Developing User-Friendly Flash Content - 04/04/2001
  8. SF/FlashForward2001 Wrap-Up Coverage - 02/26/2001
  9. Flash: 99% Proof - 01/11/2001
  10. Attention Macromedia: I Will not be Your Scapegoat - 11/01/2000
  11. Bake Cookies for your Visitors with Flash - 08/21/00
  12. Flash from FlashForward in NYC - 07/31/2000
  13. Making Sure Usability 'Fitts' Flash - 07/10/2000
  14. Hey Flasher, Stop Abusing your Visitors - 06/20/2000
  15. World Internet Animation Competition Winners Announced - 06/08/2000
  16. A Cancer on the Web called Flash - 06/01/2000
Bake Cookies for your Visitors with Flash
Friday, July 18, 2000

Bake Cookies for your Visitors with Flash (editorial)

It is time to take the battle to those who think that Flash is synonymous with bad user experience. It is time for Flash developers to start thinking smarter about how they can use Flash on their web sites. We all know about the animation and interactivity that Flash offers, but what about personalization? What about customization? What about user profiling to delivers content that meets their needs?

Part of the solution to those questions can be found by integrating cookies with Flash. A cookie is a small text file that a web server sends to your browser. Your browser stores this file for the server to request later. This file does not contain any personal information that you have not shared with the web server (by filling in a form for example), and only the web server that wrote the cookie can read it. Most web servers use cookies to store your preferences for a site, or the contents of your shopping cart.

Recently a number of Flash sites have started using cookies to better deliver content to their users.

These sites are not writing the cookies from the Flash files. They are using other scripting languages to write and read those cookies. Writing and reading cookies in Flash is possible, but hardly anyone is doing it.

Reading cookies into Flash movies is easy. With a pretty simple JavaScript, developers can read the users cookie information and pass it into a Flash movie as a series of variables. Flazoom.com does this to personalize the site for our Flazoomers and anyone who posts a comment on our reviews. Any information that is stored in a cookie can be read into a Flash movie, and with simple ActionScripting, you can deliver custom content for each user.

Figure 1
Writing cookies with Flash is a bit harder, but the benefits are limitless. You will need to incorporate Flash with JavaScript to write the needed information. You can use the Flash movie in Figure 1 to enter your name and any comment you wish to add. These variables are passed to a JavaScript function to write a cookie in your browser. Once the cookie is entered, any time you come back to this page (from the same computer, in the next nine months) your cookie information will be filled into the Flash movie (go ahead and try it).

Flazoom.com, in partnership with Virtual-FX.net commissioned MacGregor Media to develop a tutorial on reading and writing cookies using Flash.

There are many more benefits to using cookies with Flash than those listed above. Once you understand the basics of writing cookies, you will be able to develop smarter Flash movies for your site. Just think of the possibilities.

With the competition for attention on the web, any steps that you can take to make your Flash content more customized for the needs of your visitors are steps you need to be taking. Integrating cookies into your Flash movies is a good step towards assuring a good experience for your visitors. I have listed only a few of the possibilities for Flash and cookies. There are many other solutions out there. As more and more Flash developers start thinking smarter about how they can use Flash on a web site, the critics of Flash will have less ammunition to knock the format. That is what we all want, and cookies are a way to achieve it.

Ciao,

CHris

Join the cookies and flash discussion, add your comments about this editorial.

Further Reading:

  • MacGregor Media's Flash Cookie Tutorial on Virtual-FX.net
  • Colin Moock's article 'Importing Cookies'
  • Polar Light's tutorial on Cookies and Flash

  • posted by CHris MacGregor - chris@macgregor.net