User Guide

637
ADOBE GOLIVE CS2
User Guide
Init Variable
After declaring a variable, you may want to initialize it with the Init Variable action. Trigger the action with a
browser-triggered event set to onParse in the head section of the page. Choose Action > Variables > Init Variable.
Choose the variable you want to initialize from the Variable menu. (You must declare your variable beforehand for
it to appear in the pop-up menu.)
The Value item changes automatically with the type of the variable. Use the appropriate control to supply an initial
value:
Boolean A check box (selected is true, unselected is false).
Integer A text box that accepts whole numbers only.
Float A text box that accepts numbers with decimal points.
String A text box that accepts any string of text.
Layer A pop-up menu showing all layers in the page.
LayerPos Two x and y text boxes for the position of a layer and a Get button that reads the current position.
Image A pop-up menu listing the named images in the current page.
URL A typical text box, Browse button, and pick whip combination for specifying URLs.
Color A color field that brings up the Color palette when clicked.
Scenes A pop-up menu that lists all scenes in the current page.
OnCall Action A pop-up menu listing all actions from the head section that have their trigger set to OnCall.
Functions A pop-up menu that lists all function declarations from the head section of the current page.
Read Cookie
The Read Cookie action retrieves information stored in a cookie at runtime and writes a cookie value into all
variables assigned to that cookie. A cookie can be read when the page loads, or when a viewer clicks an item in the
page.
To have the browser read the cookie when the page loads, trigger the action with a browser-triggered event set to
OnLoad in the head section of the page. To have the browser read a cookie when a viewer clicks a specific item in
your page, trigger the action with a user-triggered event. Choose Action > Variables > Read Cookie. Enter the name
of the cookie specified in the Write Cookie action in the Name text box.
Set Variable
You may want to assign a certain value to a variable at runtime.Trigger the action with a browser-triggered event set
to OnLoad in the head section of the page or a user-triggered event. Choose Action > Variables > Set Variable. Enter
a unique name for the Set Variable action in the Name text box.
Choose the variable whose value you want to set from the Variables pop-up menu. The Value item changes automat-
ically with thetypeofthe variable.Use theappropriate controltosupplyaninitial valuewiththe Init Variable action.
See also
“Init Variable” on page 637