Variables in ActionScript - ActionScript Tutorial 09

Publicado em: 26 Março 2017
no 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


Nesta página do site você pode assistir ao vídeo on-line Variables in ActionScript - ActionScript Tutorial 09 duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário ChidresTechTutorials 26 Março 2017, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 404 vezes e gostou 21 espectadores. Boa visualização!