5. var userName:String = "Sammy";
משתנים
•- בספרייה אובייקטים שמות
: סימנים בלי .גדולה באות ובשם ,קטנות באותיות האובייקט בסוג לפתוחmcCircle
•- מופעים שמות
: הסוג לפי וסיומת קטנות אותיותcircle_mc
•- ()חלקי משתנים סוגי
String: a textual value, like a name or the text of a book chapter
Number: any numeric value, including values with or without a fraction
int: an integer (a whole number without a fraction)
uint: an "unsigned" integer, meaning a whole number that can't be negative
Boolean: a true-or-false value, such as whether a switch is on or whether two values are equal
MovieClip: a movie clip symbol
TextField: a dynamic or input text field
SimpleButton: a button symbol
Date: information about a single moment in time (a date and time)
6. תנאים
•: אם ו-אלא אם
if (boarder1_mc.rotation == boarder2_mc.rotation)
{
trace("condition 1 is true");
}
else if (boarder1_mc.alpha != boarder2_mc.alpha)
{
trace("condition 2 is true");
}
else
{
trace("no conditions are true");
}
•: מקונן תנאי
if ( (b1_mc.rotation == b2_mc.rotation) || (b1_mc.alpha == b2_mc.alpha) && (1<2) )
{
trace("condition is true");
}
7. לולאות
•לולאתfor:
for (var i:Number=0 ; i< 6 ; i++) תרוץ הזו הלולאה6פעמים //
{
var boarder_mc :MovieClip = new MovieClip();
boarder_mc = new mcBoarder(); מובי-קליפ של מופע דינאמית ניצור לולאה בכל //
addChild(boarder); לבמה אותו נדביק //
boarder.x = i * 75; הלולאה במשתנה נשתמש //
}