Hierarchy structures in Adobe Flash and Actionscript.

Code and Objects in Actionscript are organized in a hierarchy structure. Things that live on the main timeline are considered to be at the _root.

Movie clips that are loaded into the main timeline have their own timeline and therefore have their own way of referring to their own Objects. From within that MovieClip, the _root layer is considered to be the _parent

Functions in Actionscript. Make your Flash SWFs work better with reusable code!

So you understand using Variables and the different types of Flow Control using different Actionscript constructs. The next thing we should talk about are Functions.

A Function is a great example of reusable code. It can simply do something whenever you call it... (That kind of Function is sometimes called a "Procedure"), or it can take input variables, called "Parameters", and optionally, it can return a result to the code that invoked the Function, called a "Result".

Email Validation - Using Actionscript to validate form input in your Flash Apps.

Putting some of our basics together, let's try to write a simple Actionscript email validator. What are the criteria for an email address to be valid?

Well at first glance, here are some fairly basic rules:

Flow Control in Flash with Actionscript. Use of programming loops and controls

When we talk about Flow Control in programming, we are talking about logical control of the programming process. What the computer will do next when running your application.

If you are somewhat familiar with Flash, you may do a lot of your flow control by using the timeline. gotoAndPlay("frameLabel"); type actions. That kind of control can be handy, especially in Flash, which is timeline based. However, to write robust, interactive programs, you need more than timeline control.

Variables in programming. The workhorse of Actionscript programming in Flash.

Variables are a core construct of computer programming.

What is a variable

What is a variable, you ask? The short answer: A variable is a user-defined container for holding data for you in the course of running your program.

If you want to think of a real life analogy, you might think about a variable being like a bucket. A bucket can hold all sorts of things, water, soup, sand, snails, etc. In Flash, a variable can hold different types of data. (Most notably, String, Number, Array, Boolean, and Object. We'll get into those more later).