Home  |  Free Templates (NEW)  |  Premium Website Templates  |  Tutorials  |  Privacy Policy  |  Link Exchange  |  Contact Us
Tutorials
Photoshop Tutorials
Flash Tutorials
3D Graphics Tutorials
Partners
Free Website Templates
Flash Templates Today
Web Sites
Free Shape
Photoshop Tutorials
Flash Tutorials
Illustrator Tutorials
HTML Tutorials
Flash Templates
Free Web Templates
Free Flash Templates
Web Templates Forum
Recommended Hosting:
Host Unlimited Domains on 1 Account
1500GB storage and 15000GB bandwidth for $6.95/mo!
Recommended Hosting:
Host Unlimited Domains on 1 Account
1500GB storage and 15000GB bandwidth for $6.95/mo!
Free Website Templates: 123456789101112131415
Preview & Download Preview & Download Preview & Download

Welcome To NewFreeTemplates.com Flash Tutorials Area - Load variables from a text file

Text file must be in the format:

param1=value1&param2=value2

t1012.txt

Load text file by using:

loadVariables("t1012.txt");

Usually in Frame's ActionScript.

Create 2 edit fields for param1 and param2. Name fields Edit1 and Edit2. Create "Set Variables" button. Use the following ActionScript code for button's OnUp (or OnClick) event:

Edit1 = param1;
Edit2 = param2;

To complete the tutorial:

  1. Create a folder and download t1012.txt file to the folder (right click on the link and choose Save Target As)
  2. Launch Alligator Flash Designer and choose "Blank document".
  3. Choose "Frame" > "Frame Size" to set movie size to 300 x 200.
  4. Choose "Frame" > "ActionScript" and paste the following code:

    loadVariables("t1012.txt");

  5. Choose "Edit Field" tool and draw 2 edit fields.
  6. Choose "Select" tool. Double click each edit field and change "Variable name" to "Edit1" and to "Edit2" respectively.
  7. Choose "Button" tool and draw a button below edit fields.
  8. Choose "Select" tool. Select the button. Choose Item > Actions > OnUp. Select "actionscript" and enter the code:

    Edit1 = param1;
    Edit2 = param2;

    Click OK.

  9. Choose Frame > Frame Delay and check Stop at this frame, click OK
  10. Choose "File" > "Export SWF file" and export the file to the same folder where t1012.txt file is located.
  11. Choose "File" > "Export Web Page" and click OK for default options, a page with Flash animation should pop up in a new browser window. Click the button to load variables into edit fields.
The script will not work in preview mode unless you put txt file in the temp folder.

Advertisements
 
Home  |  Free Templates  |  Premium Website Templates  |  Tutorials  |  Privacy Policy  |  Contact Us
All Rights Reserved 2007-2008 by NewFreeTemplates.com