Game Development Reference
In-Depth Information
Creating empty boxes
Let's have a quick look at that first new line of code:
r]n op]npL]ca 6Op]npL]ca7
Is it making a little more sense to you now?
The directive is creating an empty storage container called op]npL]ca that can be used to store
Op]npL]ca objects.
What are Op]npL]ca objects? You made one—it's sitting in the ejpan]_peraOpknu^kkg*bh] Library and
is the first page of the storybook. It's the Op]npL]ca symbol.
When you created the Op]npL]ca symbol, you checked the Export for ActionScript
option. This option makes the symbol accessible by code. Technically speaking, AS3.0
isn't accessing the symbol directly; it's accessing a class that it created automatically
called Op]npL]ca, which is bound to the Op]npL]ca symbol. In Chapter 8, you'll be tak-
ing a detailed look at this process. For now, this is a process that is pretty much invis-
ible to you, so you can think of the Op]npL]ca symbol and class as one and the same.
The line of code creates an empty storage container that you can use to store an instance of the
Op]npL]ca symbol. Figure 3-5 illustrates visually what you just created.
This directive creates an empty variable
calledstartPage made to store instances
of the StartPage symbol
Only instances of the
StartPage symbol
can be stored in it
Figure 3-5. The startPage variable declaration
Search Nedrilad ::

Custom Search