Flash Builder: Working with Layers in your flash movie
This is an Archived Article
This is an archived Blog Article referencing an earlier version of Toufee. These articles are maintained for the sake of posterierity. Information presented on these pages mat not apply to this new version of Toufee.
In this post, we'll discuss about the concept of layers and how you could utilize layers to arrange the image and text items the way you want in your flash movie. One may think Layers as stacks (or a pile of books), that lets you customize (arrange), flash movie items such as text and images. An item in the topmost layer has full visibility or is shown completely. Items that are lower in the Layer ordering may have other flash items displayed (partially or fully) over it. Why need Layers? Let's take a simple example where you want to display a text item directly over an image in your flash movie. If you added the text item first and then the image, then in the normal case, the image would be placed directly over the image causing the text to be not viewable. To overcome the problem, you'd have to add the image first and then add the text item to your flash movie. This approach however may not be feasible when you have to work with a number of text or image items. This is where Layers are useful. With the Layers concept, you may re-arrange the layer order/stack order of the items such that one is shown over the other or vice-versa. Where is the Layers Option in Flash Builder? If you open the flash movie and go to the Timeline bar at the bottom you will notice that the images and text item labels will be listed. This is actually the ordering of the layers of the flash movie. To clarify, each item (text, button, image or video) that you place in your flash movie is created in its own layer. In the Timing bar where you see all the items listed vertically, you will notice a big horizontal bar over which you will find each item label (such as "Text1" or "Image4", or "Button1"). This horizontal bar represents the layer, one for each item. To move the item's layer, simply click on the empty area in the big horizontal bar of each item. Do not click over the item label or inside the item label area as this select the item...one has to click outside of the Item label text. Once you click it, the layer will be selected and you could then move the item layer up or down by drag it to move up or move down. So when you have images that take up the entire flash movie area and you wish to have text items show over or on the image, then you move the Text Items higher up the order in the Timeline and move down the image items below the text items.