1. Home
  2. Computing & Technology
  3. Animation

Deconstructing the Paint Application I: Setup, Skins, Canvas Color, Help File

By , About.com Guide

4 of 8

Skins code

You’ll want a modified version of the following code assigned to each movie clip:
on (release) {
_root.skininstancename.swapDepths(10) ;
_root.navigationinstancename.swapDepths(11) ;
}

I chose 10 and 11 as arbitrary depths that I was pretty sure would be higher than the depths of anything else that I might include in the overall composition of the application.

When each skin button is clicked, it swaps the skin associated with the instance name to depth 10, and then brings the movie clip containing the navigation up to depth 11 to make sure that it remains on top of it. For each variation of the skin, you should change the skin name referenced by the ActionScripts assigned to that skin’s button, but you don’t need to change the depth. Bringing one skin up to depth 10 automatically pushes the existing skin, which was at depth 10, behind it.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. 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 I: Setup, Skins, Canvas Color, Help File

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

All rights reserved.