A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11336 Flash Movies | 2 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Surjit Dhami
» Title: Book
» Description: Book
» More by Surjit Dhami


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

Featured Site

» Posted in the Flash Kit Links section
» Title: All-American Rejects
» Description: Get to know this great band by exploring their "practice room".


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

» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» HTML Photo Gallery Tutorial
» Create your first flash site – PART 1
» How to Make a Flash Photo Gallery
» Unknown Tag: Title10
Random Tutorial | Add Site

Webmaster (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume


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

Search Tutorials


Categories Dynamic User Survey - Part I
Author: Jei Gaither | Website: http://www.eslacker.com/ |

 
Page 4
«prev 1 2 3 4 5 6 next»

As I mentioned before, a Flash movie essentially acts as a web page when reading in values from a CGI script, in our case, a text file. The way you get the values into Flash is using the Load Variables command. Let's look at how we'd read in the values from our text file.

The Action Script above would read in the values from your text file and assign those values to your text fields, or, if there aren't any text fields with the name being passed in (i.e. Name or Email), Flash would create a variable to hold the value. This can be very helpful if you want to have values that you're not ready to use until a later point in your movie. Just be sure that you can get to your variable when you need it.

Note the Tell Target ("/Variables") statement above. Using an empty Movie Clip on the main timeline to store all of your variables helps you keep track of them and will prevent values from 'disappearing' if you remove Movie Clips.

The other thing to note here is that if you're using a CGI script instead of a text file, you'd just type the path to it where you see poll.txt above. Also, at the bottom, under the Variables section, if you're just using a text file, there's no sense in sending anything to it, but if you have a CGI script, you may want to send variables to it. Your CGI script could then process these variables or kick off another action. Flash will basically send any variables that are currently in scope to the URL you've provided.

What does that mean? Well, it means that if you're on the Main Timeline and you have a handful of variables (like Name and Email in our example above), they will be sent to your CGI script. If this Load Variables is performed somewhere else, like inside a Movie Clip, then your variables on the Main Timeline will NOT be sent. Notice that the Load Variables is inside a Tell Target block.

This means that the values that are received from your CGI script will be declared on the Main Timeline. You'd then be able to refer to them anywhere else in your movie by referring to them as /name, and /email (to follow our example). In Part II of this tutorial, we'll go into much more detail on sending variables to CGI in order to save them.

«prev 1 2 3 4 5 6 next»

» Level Advanced

Added: : 2000-12-14
Rating: 8.47 Votes: 71
Hits: 7018
» Author
Jei Gaither is a web developer in Austin, TX. His projects out-weigh his spare time, but he still manages to find new uses for Flash and creative interfaces.
» Download
Download the files used in this tutorial.
Download (33 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.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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