Game Development Reference
In-Depth Information
The order in which Flash arranges the depths of visual objects on the stage is called the stacking order .
If you select the Send Backward option, the selected objects will move back one place in the stacking
order. If you have three or four objects stacked on a layer, you can use the alternative Send to Back
option to move a selected object that's at or near the top of the stack all the way to the very back.
When you drag a symbol from the Library onto the stage, you create an instance of
that object. If the symbol is a rubber stamp, the instance is like the ink impression
of that stamp.
You can also think of a symbol as a template or cookie cutter. In the same way that
you can eat a bag full of cookies but not the cookie cutter that made them, you can
use a symbol to make as many copies of that object as you want while still keeping
the original intact. That's why even when you drag your cloud object from the Library
onto the stage, the cloud still sits in the Library , floating serenely without a care in the
world. And you can still use it to make as many more instances of that cloud in your
storybook as you want to.
The interesting thing about the relationship between the symbol and its instance is
that whenever you make a change to the symbol, all the instances of that symbol are
changed in exactly the same way. You can try this with your ?hkq` object. Open the
?hkq` symbol and make a small change to it, such as giving it a darker fill color. When
you then take a look at your Op]npL]ca symbol, you'll notice that all the instance of
the cloud that you used there also acquired the same darker fill color. If you had used
1000 instances of your ?hkq` symbol somewhere in your storybook, all of them would
suddenly darken. All that from just making one small change in the symbol!
This is an extremely powerful aspect of the relationship between symbols to instances
and is an important concept to grasp before you go much further. AS3.0 programming
is completely based around this same model. In AS3.0, a class is analogous to a sym-
bol, and you can make as many instances of a single class as you need to in your pro-
grams. If you understand the relationship between symbols in the Library to instances
on the stage in the visual way that you've used it with the cloud, it will give you a huge
advantage to understanding the more abstract way this works in programming code.
It's completely identical.
Creating some flowers
Flash's drawing tools are not the only way to create vector graphics with Flash. Another very useful
technique is to make a graphic using a dingbat font. Dingbat fonts are fonts that contain graphic
images instead of letters or numbers. The Wingding and Webding dingbat fonts are installed on most
computers as part of the operating system, but there are thousands of others that specialize in cer-
tain character sets. Many dingbat fonts are free; you just need to download and install them on your
computer to use them.
Dingbat fonts are especially useful when you're just getting started with game design because they will
save you the tedium of creating common graphic shapes from scratch. Lots of the little shapes that
you'll need to make things like bullets, features for characters, and buttons you'll find ready-made as
part of a dingbat font set. Flash allows you to convert fonts into ordinary vector graphics, so you have
complete control over the final look of graphics created from dingbats.
 
Search Nedrilad ::




Custom Search