Data Types

* Strings or Literal Values [“ActionScript”]
* Numbers [5]
* Boolean [true] – these are useful for making decisions

Variables

A variable is a container that is used to store your data
variable = value;
How to Write Variables
Naming Variables: Important Tips to Remember

* Don’t Use Reserved Names such as: {}, ;, (), break, call, case, continue, default,delete,do,else, function,for,if,in,new,on,return,set,switch,this,typeof,var,void,while, and with.
* Don’t Use Spaces
* Don’t Begin Variables with Numbers
* Don’t User Operators in Variable Names
* Don’t Use the period (.) operator in your variable names

Example Variable Names

* cow
* cowPuke
* menu6

Three Ways of Writing Variables

* nQuantity = 10;
* var nQuantity = 10;
* nQuantity:Number = 10;

var nQuantity:Number <-- how you declare the datatype and variable nQuantity = 5; - an expression which says nQuantity is equal to 5. Assignment Operators * (addition) * - (subtraction) * = (assignment) [for assigning variables] * == (equality) [test two expressions for equaltiy nQuantity == 10] * / (division) [divides two expressions 10/20] * * (multiplication) [multiples two expressions 10 * 20] * (increment) [add 1 to an expression, nQuantity ] * -- (decrement) [subtract 1 from an expression, nQuantity--] * < (less than) [compares two expressions] * > (greater than) [compares two expressions]
* != (inequality) [test for inequality of two expressions – nQuantity != 10;]
* = (addition assignment) [example experession1 = is the value of expression1 expression2, shorter way to write this out]
* -= (subtraction assignment) [examples expression1-= is really saying subtract expression 1 from expression 2]

Expressions

Expressions are often sequences of literals and variables linked together by mathematical symbols. We can generate values to be stored in variables by writing expressions.
How to Write Expressions

The Example below highlights how you can use variables along with operators to store new values.
var nQuantity, nResult;
nQuantity = 20;
nResult = nQuantity – 10;
Using trace to debug your actionscript

You can use the trace command to debug your actionscript and see the results of your expressions in the output window.
var nQuantity, nResult;
nQuantity = 20;
nResult = nQuantity – 10;
trace(nResult);
Input and Output

Using Dynamic Text Files in Flash you can pass variables to and from flash by entering the variable name into the Var field in the properties window.

carmen luvana moviesanother movie cast of teen notnude movies celebcelebs list movies nudelicking movies clitfiesta tiffaney movies cummovie download dbz 12movie dead or kasumi alivemovies dreamworkspussy movies eat5120a nokia free ringtonebostock street warrington lancashire 44warrington path deer dr 2353 paverizon myles alannah ringtoneall sl56 siemens saints ringtonesringtone motorola alltel t31230030 torrington famine of hourslarry mullen cingular adam ringtone clayton Mapmp3 adele pavements chasingmp3 god perfect speed 13132 cornelius gurlitt mp3hookup 1800 goldwing mp31920s mp3 charleston21307 26446 mp3 36947 20811 212202am breathe mp3lemmings 32k mp3 Mapliberty 4th loan500 payday 1000 loanloans advantages ofpayment loan 401k lateloan forgiveness 40home loans amcconsolidation financial services student american loansc home bad 100 credit loans Map$10,000.00 instant loan personalborrower login acs loansafrican azu loanall-in-one michigan construction loanloan abnb a hasloans amorazation of homeloan pro aje calculatorhousing starc affordable loan Mapmuff movies divingmovie wallpaper horrorgay movies free blacksex movies home couplesmovie rave theaterclips big natural tits movie freelesbian xxx movies freecouples home sex movies Mapdick free movies bigfree movies enemamovie kama sutrafiction pulpwild movies girls goneass movies lickingbig movies free dickfucking hard movies Mapsubmitted amature pornporn amature titporn video amaturewebporn amatureporn amature videos wifeteen porn amatures xxxamauter porn gayporn amauter tube Mapmidi ringtones 2.0freeware converter mmf ringtonemodest ringtone mouse dashboardringtones mono streat manic preachersthe for ringtones phone moremortal kombat forum ringtonesnoise ringtone mosquitomotarola ringtones razor Mapbee super ringtoneringtones free t sending mobileteddy ringtone amr bearthe ringtone chi-litesringtones chop tomahawktrace ringtones fhoneringtone by bluetooth transfermotorola verizon ringtones k1m Map

Categories: FlashWeb

0 thoughts on “ActionScript Basics: One”

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Web

Angular JS Magazine on Flipboard

I have been working with AngularJS for about a year now, trying to learn as much as I can about this growing framework. It’s been a wild ride and I’m going to post a summary Read more…

Top 5

Top 5 Articles : Week of November 25

During the the week of November 25th, I really started to dive into Angular JS. My top 5 articles of the week are mainly about AngularJS, an MVC framework by Google. #1 : AngularJS WebInspector Read more…

eCommerce

How to implement Bronto Email JavaScript Conversion tracking in Google Tag Manager

This tutorial will show you how to setup Bronto Advanced JavaScript Conversion tracking using Google Tag Manager. Bronto Advanced JavaScript tracking gives you more visibility to all of the products that customers are purchasing, then Read more…