Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions Tools to help you create your site Free and shareware fonts to download Photographs to use in your projects Shop for your site needs Free Online classes REcommend this site to others Log in or edit your information when logged in Developingwebs Log Out Change My Account details and preferences
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

Variables Using Strict Data Typing

Flash MX 2004 and 8

1. A variable is a holder for a value. A variable is like a coffee cup where it can hold the value for the variable. It may be empty, contain a "cup of Columbian coffee" (string), 50 pennies (number), or paperclips, pushpins, and pennies (an array). There are three types of value holders or variables.

  • A Number is strictly digits
  • A Sting is any combination of characters, including letters and/or numbers. The value is usually seen written in quotes "this is a string". The quotes mean a literal interpretation of the value, or string.
  • An Array is a set of values. This can be a set of variables, movie clips, information, coordinates and more.

2. You can specify if a variable is holding a number, a string or an array, Using this format will set the variable type until you change it. If your variable name is myVariable, then you can specify the following:

Number var myVariable:Number = 25;
   
String var myVariable:Number = "some string value";
   
Array var myVariable:Array = newArray();
   

 



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2010 All Rights Reserved
Privacy and Legal