Internet Commerce

Partners & Affiliates

Developer Channel


Featured Flash FLA
Gallery Downloads 11401 Flash Movies | 5 New Flash Movies Added
What's New | Top 100

Featured FLA

»  Author: Nick Kouvaris
»  Title: Znax
»  Description: Znax is a board game. Click 4 tiles of the same color and form squares as big as you can. You will erase all the tiles inside the square and collect points. Get maximum score if you make a square with game edges.
»  More by: Nick Kouvaris


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

Featured Site

»  Author Agence WOP Digital Agency
»  Title: Electricdrum
»  Description: French WOP Agency, 3D websites, Flash (Papervision, Away 3D), event or institutional projects. The agency operates on all digital projects: consulting, design, graphic design, development, online communication. The WOP agency follows you on the implementation of original, creative and optimized digital projects.


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

» How To Make A Simple Animation Using Christmas Clips
» Simple Step by step flash game tutorial Spot the diffrence
» How To Make A Moving Text Slide
» Create Flash Banner With Text Float Effect
» How To Make Zoo Photos Slideshow
» How To Make A Dolphin Photos Slideshow
» How To Make A Fathers Day Slideshow
» How To Make A Transparent Background of Your Flash File
» Create Flash Banner With Text Disco Light Effect Today we will introduce you a Text Disco Light eff
» Unknown Tag: Title10
Random Tutorial | Add Site


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.35 Votes: 73
Hits: 7030
» 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