Notes for You:: Variables in ActionScript.
Variable:
is a named memory location, whose value may change during the execution of a program.
In order to grab a chunk of memory location and provide a meaningful name to it, we need to declare a variable or a constant.
Declaring a variable or a constant:
means allocating a memory location for some data.
In order to change the value in a variable or constant, we need to initialize or assign a value to it.
Initializing a variable or a constant:
means putting a data value in that allocated memory location.
Syntax for Declaration of a variable:
var nameOfVariable:datatype;
Note:
Default value of a variable or a constant, depends up on the type of a variable or constant.
Syntax for Declaration and Initialization of a variable:
var nameOfVariable:datatype = value;
Syntax for Declaration of multiple variables:
var nameOfVariable1:datatype, nameOfVariable2:datatype,...;
Syntax for Declaration and Initialization of multiple variables
var nameOfVariable1:datatype = value, nameOfVariable2:datatype = value,…;
Example Code:
var playerScore:int=10;
trace(playerScore);//10
var player1Health:int=100,player2Health:int=100;
trace("player1Health=",player1Health);//100
trace("player2Health=",player2Health);//100
=========================================
Follow the link for next video:
• Constants in ActionScript - ActionScr...
Follow the link for previous video:
• Identifiers in ActionScript - ActionS...
=========================================
ActionScript Tutorials Playlist:-
• ActionScript Tutorials
=========================================
Watch My Other Useful Tutorials:-
How to Make Save Boundary Game in Flash with ActionScript:-
• Save Boundary Game in Adobe Flash
Adobe Flash Tutorials Playlist:-
• Adobe Flash Tutorials
Adobe Animate Tutorials Playlist:-
• Adobe Animate Tutorials
=========================================
► Subscribe to our YouTube channel:
/ chidrestechtutorials
► Visit our Website:
https://www.chidrestechtutorials.com
=========================================
Hash Tags:-
#ChidresTechTutorials #ActionScript #ActionScriptTutorial
Auf dieser Seite können Sie das Online-Video Variables in ActionScript - ActionScript Tutorial 09 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer ChidresTechTutorials 26 März 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 404 Mal angesehen und es wurde von 21 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!