RSS
email
0

ActionScript Basics part6



Loops are used to execute same statement of code for definite number of times.

There are three kinds of loops in ActionScript, the for loop, the while loop, and the do loop. There are also two other kinds that are loops used specifically for traversing a collection such as an Array, and can’t be used in any other way. These are the for…in loop and the for…each loop.

Learn ActionScript basics for free

For Loop
The most frequently used looping statement ain any language is For loop.


for (var i:int = 0; i < 10; i++) {

trace("Hello.");
}
The for loop contains three expressions

1. Initialization
2. Condition
3. Increment/decrement


Read More..
Read more
0

ActionScript Basics part5



Logic is a part of our everyday lives – it’s a very familiar concept, therefore one of the easiest to understand. We are faced with questions all the time, with the “If” question being the most common. If I go to sleep early, I will be able to get up early. If I take this job, I will make more money. If I go to school, I will learn ActionScript. Using ActionScript, you can answer all of these questions using conditional statements.

Conditional statements allow you to setup the question or logic within your script, and if it is a true statement, then actions can be taken which are defined by you. Conditional statements create smarter scripts by performing an action based on something that has been setup in the program – it makes your scripts dynamic!

Similar to other languages, ActionScript offers designers and developers the use of the following conditional statements:

Read More..
Read more
0

ActionScript Basics part4



In this tutorial we are going to explore Array which is available in most of the programming languages.

What is an Array?
Array is used to hold collection of data or list of values of same datatype.
Array has many buitin functions to manipulate the values it holds.
An array data can be accessed at anytime using array index.
Creating an Array
To create an array, declare a variable of type Array and declare the new Array object.

Learn ActionScript Basics tutorial

var arrObject:Array = new Array();
There is another way of of creating an array using square brackets that called array literal.

var arrObject:Array = [];

Read More..
Read more
0

ActionScript Basics part3



n this article we are going to learn about the followings

What is a variable?
Declare a variable
Define datatype
Assigning value to a variable
Doing calculation and output a variable
What is a variable?

Learn ActionScript Basics

Remember any mathematical calculation we studied in our school,

Area = side * side (Formulae to find area of square)

Here side going to have some value, which we multiple and assign the final value in Area.
So each of the is a variable going to hold some number.

In programatic way of variable may have not only numbers, it may also have Text, Character, Boolean (True|False).

Read More..
Read more
 

Recent Posts

Recent Visitors

Donate Me

About Me

My photo
Chennai, Tamil nadu, India
Nothing more to say about me.. Just a Action Script programmer / Flex developer having 4.5 years of experience.