The library in flash can be your friend or your enemy. So keep your friends close, but your enemies closer. The library is a great way to organize pictures, buttons, movieclips, graphics, and so on. Now I have started naming things without even telling you what they are. The library organizes objects you create on stage, but not just any drawing only drawings and objects that you specifically tell to be in the library. Sound confusing? Well it’s not and I will show you.
Draw a square on stage. Any size and color will do. Now use the selection tool and select your square. Copy your square and move it to the right of the original square. To copy your square, select it and hit Ctrl+C on the keyboard. Now hit Ctrl+V to paste your new copy to the stage. You should now have 2 squares on stage.
Now lets say you want to change the color of these two square. You’ll have to change them one by one.
This doesn’t seem like a big problem right now, because this is a simple example with two objects. Imagine you have created a project with many frames and layers. With blue squares, red circles, and yellow rectangles. You worked really hard on this project. You finally show it to your client, and now they say they want red squares, yellow circles, and blue rectangles. Now in your head you say “You got to be kidding me?”, but you don’t say that. Now this can be an easy change or a difficult change. If you learn how to set up projects the proper way this will never be a problem.
If you have to do this manually, you would have to go through each frame and make all those changes to every single square, circle, and triangle. Using the library can help you speed through these type of changes. Lets start with a clean stage. Erase everything by selecting Ctrl+A, then Delete on the keyboard. Now draw a blue square, red circle and yellow rectangle on stage.
Select the square with the selection tool, then hit F8 on the keyboard. The Convert to Symbol dialog box will appear.
Name your symbol square, click graphic, and registration is center, then click ok.
We will go into more detail on movieclips, buttons, and registration point at a later time. Now lets look at your library, hit F11 to bring up your library if it is not already open. Normally it is located on the right side of the screen.
As you can see you have one object in your library your square you just created. Do the same thing for the circle and rectangle that you did for the square and name them respectively.
You should now have 3 objects in your library circle, rectangle, and square. They should all have an icon that looks like tiny geometric shapes. This is a quick and easy way to tell if it is a graphic.
Editing Library Objects
Lets start editing your objects. On stage copy and paste all of your objects a few times so you have a large number of shapes.
Before if you were asked to edit each color you would have to go to each one manually and change them, now it’s simple. Lets change the square from blue to red. To make this change, have the selection tool selected and double click any of the squares on stage. You are now inside the square graphic.
Change the color of the square to red.
You are still inside the square graphic, to exit simple double click anywhere except for on the square.
As you can see all the squares have changed this is because all the of the squares are the same instance as the square in the library. You can either change the square in the library or on stage. You do the same thing either double click the object on stage or in the library. Go ahead and do the same thing for the other two object in the library. Setting up projects like this help you become more proficient with changes.
You can organize your objects in the library in to folder, rename your objects, and delete objects in your library. Remember deleting on in the library means it deletes it everywhere you used it in your file.
There are other types of objects that you can add to the library, which include movieclips and buttons. These will be covered in the next topics. Keep messing around with adding more graphics and reorganizing objects in the library.
NOTE: Be sure to check out Part 4.