7 - Locking Layers

15/11/2010 11:21

 Locking Layers & Publishing

Locking layers in Flash CS3 is useful when we want to manipulate some elements on the stage without disturbing any of the others. Another option that is helpful is the hide layer option. This will hide the layer so that we can work more easily as the number of elements on the stage increase, but will still appear in the final output.

Continuing with the tutorial, let us use the Lock Layer option to easily select the various parts of the train.

Train Animation

Now that we have all the parts of the train ready, we are ready to animate it.

  • Select all the parts of the train (including wheels). 
  • The easiest way to select all the parts of the train is to lock all the other layers first so that the elements in those layers don't get selected. 
  • To lock a layer, click on the dot below the lock symbol next to the layer name in the timeline.

    lock layers in flash cs3
  • Another easier way to select all the parts of the is to simply click the key frame on the train layer.
  • Convert to a graphic symbol named “train”.
  • Now select it again (now “train” symbol) and convert it to a movie symbol named “train animation”.
  • Double click on it to get into the symbol “train animation”.
  • In the 1st frame position the train on the far right (outside the stage area).
  • Insert a keyframe on the 60th frame (since the frame rate is 12 frames/ sec, and we want the train animation to take 5 seconds) 
  • Position the train to the far left (outside the stage area).
  • Create a motion tween between the two frames.
    Now test the movie [Control > Test Movie]

You will notice that the train enters from the right travels across the stage and exits from the left. And then the animation loops again and again.



You will need to publish your flash file in order to put it on your website. The source file (that you are working on) is .fla file, but the file that needs to go on you website should be a .swf file. Also you will need to ensure that you have and HTML page with the code to display the .swf file in order for browsers like Internet Explorer and Firefox to be able to display the Flash file. Finally you will need to upload it to you website hosting server using an FTP software like Filezilla, to make it live.

Continuing with the tutorial, now that your animation is ready you can publish it and upload it to your website.

  • File > Publish
  • You will get an html file and the .swf file in the same folder where you .fla file it. The .swf file is your output file which you can upload to your website along with the html file that calls it.




That's it.  Hand in your completed assignment.


Make a person walking across the screen, arms swinging and legs moving.  Make sure you have the knees bending.