Home Tutorial Flex Flex4 Flex Variables

 
 

Flex Variables
Posted on: April 19, 2010 at 12:00 AM
A variable is a reference to the value associated with it. Variables are used to store values for the application.
A variable is a reference to the value associated with it. Variables are used to store values for the application.

In flex, var statement is used to declare the variable.
var myVar:int;

Variable is assigned a value using assignment operator (=).
myVar = 10;

Declaration and assignment of the variable can be done simultaneously.
var myVar:int = 10;

The type of the variable can be any predefined type provided by flex or custom data type.
var myVar:MyClass = new MyClass();

Related Tags for Flex Variables:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.