1. Home
  2. Computing & Technology
  3. Animation

Deconstructing the Paint Application IIX: User Layers, Clear Layer

By , About.com Guide

4 of 5

Testing for Layer Activity: Layer 1

What about layer 1, though? We could do this the hard way and set up an else statement that says in all other instances (in other words, when layerone=true and layerzero=false), then all drawing activity should take place on the movie clip named “layer”, on layer 1 above the layer 0 movie clip “drawing”.

Personally, I find that to be a little messy to keep track of. So, to make things neater, instead I simply copied all the ActionScripts and assigned them to a second remote controller movie clip, changed the if statement to test for layer 1 instead of layer 0, and changed the name of the movie clip acted on from “drawing” to “layer”.

This way, whenever any action is taken regardless of the active tool, Flash checks to see which layer is active. If layer 0 is active, all drawing takes place inside the “drawing” movie clip; if layer 1 is active, all drawing takes place inside the “layer” movie clip above it.

Explore Animation
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Deconstructing the Paint Application IIX: User Layers, Clear Layer

©2009 About.com, a part of The New York Times Company.

All rights reserved.