Hello all!

Welcome to AS3ForDesigners !

This is my very first post,and here I will talk about the reasons of starting it.

For the last three years, I was a software developer in eLearning field,using mainly Actionscript 3.0 as programming language.

I started as eContent developer in a small company  in El-Mansoura city, which are young city in the field of IT in Egypt.

I was mainly dealing with Flash time-line,and adding the code directly after the graphic designers and the animators complete there work.

The team was young but well prepared for the eLearning life cycle,so it was easy to guide the designers to prepare there files to be easy for the developer to add the code.All of the team was graduated from the eLearning department in ITI.

After only six months I start my work with a bigger company in the field of eLearning,it was over +120 employer and the background of them was different.

I started dealing with graphic designers,animators and illustrators  who do NOT care about the code 🙂 they was all the time creative and hard worker and innovators,but the developer have the load of prepare the file for the coding process.

I think it is the public case,so I started sharing some tips and tricks which can minimize the time of developing the final output,mainly prepare the file, as possible, to the developer.

Then I was in work trip, and start training a small group of graphic designers,how to write AS3.0 code for there work in eLearning field.

Here the Idea of the blog appear to me,why NOT !! Learning Flash graphic designers how to code !!!

Here I will share how to writ AS3.0 in the Flash time-line, if you are graphic designer aware about Flash Professional (CS….) you can start now learning AS3.0.

Good luck for you all.


Tagged with: , , , , , , ,
Posted in Flash

Interact with MovieClip

There are many features of the MovieClip  that we can change by the code :

  • x and y position :
    • star_mc.x = 200;
    • star_mc.y = 300;
  • alpha to change the clearness of the MovieClip :
    • star_mc.alpha = 0.5;
    • star_mc.alpha = 0;                  //The MovieClip will NOT be visible
    • star_mc.alpha = 1;                  //The MovieClip will be visible and clear
  • rotation to rotate the MovieClip :
    • star_mc.rotation = 30;       //clockwise rotation
    • star_mc.rotation = -30;      //anticlockwise rotation
    • star_mc.rotation = 180;
    • star_mc.rotation = 360;
  • width and height :
    • star_mc.width = 100;
    • star_mc.height = 100;
  • scaleX and scaleY to stretch the MovieClip :
    • star_mc.scaleX = 2;           //duplicate x scale
    • star_mc.scaleY = 2;           //duplicate y scale
  • buttonMode to give the MovieClip the Button touch :
    • star_mc.buttonMode = true;    
    • star_mc.buttonMode = false;   
  • totalFrames return the total number of MovieClip key frames :
    • trace(star_mc.totalFrames);
  • currentFrame return the number of the current MovieClip key frame :
    • trace(star_mc.currentFrame );
  • mask : make another MovieClip as a mask for our MovieClip :
    • star_mc.mask(mask_mc);
  • mouseChildren : enable or disaple the mouse access to the content of the Movieclip
    • star_mc.mouseChildren = false;       //can NOT access to the MovieClip content
    • star_mc.mouseChildren = true;        //can access to the MovieClip content

During our discussions we will use these features during our work according to what we want to do.

Tagged with: , , , , , , ,
Posted in Actionscript, Flash

play(); the stopped MovieClip

If we have a MovieClip on the time-line,and we need it to start its animation in a specific time,what we should do ?

1- at the 1st key frame in the movie MovieClip we will add “stop();” ,that will make the MovieClip stopped at its 1st key-frame.

2- on the stage time-line,we will give the MovieClip an instance name,say “star_mc”.

3- when we want the MovieClip animation to start,just on the time-line call the MovieClip by its instance name and start the “play();” function : star_mc.play();

4- as we know,when the MovieClip end,it start again,that mean it will reach the 1st key-frame again,so it will find our code “stop();” and will stop.That mean the MovieClip will play only one time.

Tagged with: , , , , ,
Posted in Actionscript, Flash

stop(); the MovieClip

We talked about “stop();” function,and how we can use it to stop the time line at a specific key-frame.Just add “stop();” for the Actions panel at the desired key-frame,and it will be stopped.

If we want to stop a specific MovieClip on the the time,we need first to give it an Instance Name

The Instance Name is the name we can use in Actionscript for acting with the MovieClip.

There are many things we can notice about the name and how we select it,we consider the MovieClip object as a variable ,and the variables in ActionScript 3 have some limitations to be considered :

Naming limitations for variables in ActionScript 3

  • Variable names cannot be a reserved word or keyword. For more information, see ActionScript 3 fundamentals: Syntax
  • Variable names must start with a letter, an underscore, or a dollar sign
  • Variable names cannot use special characters (except _ and $ in certain situations)
  • Variable names must be unique

So,we can give any name match with these criteria for the MovieClip to act with it via ActionScrip,as example :

  • myMovieClip
  • object1
  • _car

We prefer adding “_mc” at the end of the given name to be easy remembered in the


  • myMovieClip_mc
  • object1_mc
  • _car_mc
  • anyName_mc

Now we can call that MovieClip via ActionScript and apply any required code.

We will start with “stop();” function,we will see how to stop that MovieClip at any key-frame on the time-line by attaching the function to the instance name :




Lets see our example MovieClip animation :

Then we add our MovieClip to the time line.As we know the movie clip will repeat its animation all the time,so when we need to stop it we just add the code for it : ourMovieClipName + stop();

to apply the function on the MovieClip it attached by adding dot.‘ between them.


that mean apply stop(); function on the object called car_mc

like That :

Try it,best wishes.

Tagged with: , , , ,
Posted in Actionscript, Flash


The first thing we can use in AS 3.0 is the already exist and required by most of us.

We will talk about stop(); function.

We should understand what we mean by “function” ?

When we say function in programming language,we mean a collection of code lines grouped together under a single name to do specific action.

So,when we say stop(); we mean that the application will call the collection of codes witch do the action of stop.

We will discus how to build the function soon,but NOW we will only use predefined and ready functions.

What stop(); do ?

From its name,the stop(); function responsible of stopping the running of the animation on the time line.When we add stop(); at any key frame,the animation will stop at these point.

Where we can insert stop(); ?

At any key frame on the time line of the stage or the MovieClip.

Tagged with: , , , , , , , ,
Posted in Actionscript, Flash

Where to Code ?

At any key frame.

We can add the AS 3.0 code at any key frame in the time-line, if that key if empty or NOT.

Flash timeline

We can add code at any key frame alonge the time line

The execution of the code will be by order of the key frames ,First come First done.

The key with AS code will lapel with small letter “a” on each of them.

We will write or code on the time line directly,as a designer you will NOT need to write the code in an external file,it is advanced and we will NOT need to use it  NOW.

At any key frame press “f9” to open the Action panel or right click on the target key frame and select “Action” :

In the Actions panel we can start adding our code.

Hint : As we can write the code on the stage time-line key-frames,we can write it also on the MovieClip time-line key-frames by the same way.But we can NOT add code to Graphic object or Shape.

Tagged with: , , , , ,
Posted in Flash
Follow AS3.0 for Flash Designers on WordPress.com
Follow me on Twitter