A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


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

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


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

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» 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
» Unknown Tag: Title10
Random Tutorial | Add Site

Trading Customer Accounting (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


Tutorials Tutorials » Backend

Categories Loading variables from a text field and Editing/Updating the values via Perl
Author: Jeffrey F. Hill | Website: http://www.snowvids.com |

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

Part III - Setting up the Flash Movie to work on your server

Basic Theory and Necessary Changes for the Flash Movie

The first thing the Flash movie does is load the variables contained in the text file that you have already uploaded.  In this example the actionscript for doing that is located in one of the first frames of the movie.  Here is the example code: 

loadVariablesNum ("http://www.snowvids.com/PerlTut/Ex2TextFile.txt?Ran="+random(999), 0);

You will have to change this in the Fla (It's clearly marked when you open it up) to the url path where the text file is located on Your server.  In the example movie this Frame ActionScript is located on frame number 10 in the first layer.  After you have changed this in the example Fla you can run it on your server and it will load the default values in the text file into your movie.  One not on the above ActionScript - Notice the ?Ran="+random(999) portion, this just adds a random number onto the end of the text file so that the browser loads a new file each time, ie it's not in the cache.  The default values are shown below.

Title=Default Title&Contact=jfhill1@aol.com&About=About Default&News=Default News&
Products=Default Products&Link=http://www.snowvids.com

In the movie there are dynamic text fields with variable names corresponding to what you see in the text file.  For example the text field named "Title" will have the value "Default Title" when you load the variables from the text file and so on.  If this part is not working you don't have the url path set correctly.  This part will work independent of the Perl Script. 

Edit / Update Variable Values

There is a link from the example movie to this part of the movie.  In most cases however you will not want everyone editing your movie.  You can avoid this by either making it a secret spot within the movie, have this area password protected or make the Edit/Update part of the example into it's own movie - that only you know the path to.  The last way is probably the best and easiest way. 

The update/Edit area contains the same text fields with the same name as the 1st part, with the exception that they are now input fields instead of dynamic fields.  

You only need one button to update/Edit the text file.  This button contains the ActionScript

on (release) {
loadVariablesNum ("http://www.snowvids.com/cgi-bin/UpdateVars.cgi", 0, "POST");
Status = "Updating Variables - Please Wait till you see the Update Success Message";
gotoAndPlay (35);
}

You need to change the url Path to the url path to "UpdateVars.cgi" on your server.  This will execute the cgi file and update your text file.  The Status variable is just something extra I put in to tell the user when the update process begines.  The cgi file will pass back a variable to tell you when it's Complete.

«prev 1 2 3 4 5 6 next»

» Level Intermediate

Added: : 2001-07-13
Rating: 8.67 Votes: 96
Hits: 3892
» Author
No details available.
» Download
Download the files used in this tutorial.
Download (19 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, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs