Variables in ActionScript - ActionScript Tutorial 09

Publicado el: 26 marzo 2017
en el canal de: ChidresTechTutorials
404
21

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


En esta página del sitio puede ver el video en línea Variables in ActionScript - ActionScript Tutorial 09 de Duración hora minuto segunda en buena calidad , que subió el usuario ChidresTechTutorials 26 marzo 2017, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 404 veces y le gustó 21 a los espectadores. Disfruta viendo!