FLATLAND TUTORIAL
|
12
| POPUPS
POPUPs are 2D images
or text that you can assign to specific locations in your map. They are
not visible to the visitor at first, but "pop up" on the screen when the
visitor gets within a defined radius of the location that holds the POPUP,
or when she rolls her mouse over a block that holds the POPUP. POPUPs are
very useful for including extra information that you want a visitor to be
able to see, without cluttering up your SPOT. They are great for providing
detailed info about many objects in the spot. They also can be used to provide
a simple navigational map of your spot that is visible right at the entrance.
Heck, you can even use them to hurl random insults at your visitors. We
don't care what you do with them. (Though we'd prefer you not use them to
hurl random insults at Flatland.)
The <POPUP> tag, like the <ENTRANCE> and <EXIT> tags, can go
anywhere in the BODY. We usually place them at the end of the BODY, after
all of the levels have been defined. But you can put them after the level
in which they occur if you prefer. POPUPs can also be attached to blocks
by putting the <POPUP> tag inside a <CREATE> tag. POPUPs can contain
either textures, text, or imagemaps.
POPUP Textures <POPUP LOCATION="(column,row,level)" TRIGGER="rollover,proximity|everywhere"
RADIUS="blocks" TEXTURE="folder/image.gif" PLACEMENT="mouse|top-left|top|top-right|left|center|right|bottom-left|bottom|bottom-right"
BRIGHTNESS="number%" />
LOCATION describes where in the map the POPUP is anchored. If the POPUP
is attached to a block in a CREATE tag, then the LOCATION parameter is
not needed. If the POPUP is not attached to a block, and the LOCATION
parameter is left out, then the POPUP will be displayed throughout the
entire spot.
TRIGGER is how the POPUP gets activated, either by rolling over it with
the mouse, or by coming within the specified radius, or both. Or, if TRIGGER="everywhere",
then the POPUP will appear throughout the entire spot.
RADIUS is how close the user has to be to the LOCATION to trigger the
POPUP (when TRIGGER is set to "proximity"). RADIUS is described as a whole
number of blocks. Unlike LIGHTs and SOUNDs, the RADIUS for POPUPs only
functions on one level. i.e. a POPUP on level 4 with a RADIUS of 2 will
not be visible on levels 3 or 5.
TEXTURE of course defines the file that will pop up.
PLACEMENT describes where on the user's screen the image will appear.
BRIGHTNESS defines how bright the POPUP will appear.When PLACEMENT="mouse",
the popup will appear in the same location as the user's cursor.
POPUP Text TEXT="message" TEXTALIGN defines how your text will appear in relationship to the POPUP
texture.
TEXTCOLOR is the color of the text.
You can also assign a color to the POPUP itself, rather than a texture.
To do so, you will need these two additional tags:
COLOR="(r,g,b)" SIZE defines the size of the rectangle of color on which your text will
appear, measured in pixels. If you place text over an image, then the
COLOR attribute will be used to define a color for a drop shadow on the
text, making it easier to read against the background image. If no COLOR
is defined, then the background of the POPUP will be transparent by default.
POPUP Imagemaps <IMAGEMAP NAME="imagemap name"> When creating a rectangular area of an imagemap, the coordinates x1,y1
refer to the top left corner of the rectangle, and x2y2 refer to the bottom
right corner. When creating a circular area of an imagemap, x,y refers
to the center of the circle.
In order to use an imagemap in your POPUP, add the following parameter
to the POPUP tag:
IMAGEMAP="imagemap name"
Note: If you are using an IMAGEMAP with your POPUP, and you have
TRIGGER set to "rollover", then your PLACEMENT will have to be "mouse".
Otherwise, the POPUP will disappear before your visitor can select anything!
So the entire <POPUP> tag, with all the possible attributes looks
like this: Default values are as follows:
Add some POPUPs to your TALL
spot. <POPUP LOCATION="(3,3,3)" RADIUS="2" TEXT="What's so funny?"
<POPUP LOCATION="(3,7,3)" RADIUS="2" TEXT="Beats me man!"
Save your file and open it in your browser. Move around on the roof and
take a look at how the POPUPs work.
Save
your file and open it in your browser. Move around on the roof and take
a look at how the POPUPs work.
|
Copyright 1999, 2000 Flatland
Online, Inc.