User Guide
636
ADOBE GOLIVE CS2
User Guide
There are two major uses for assigning values to variables at runtime, which you define with the Set Variable action:
• You can use variables as pseudo-constants to specify a fixed value for another action.
• You can dynamically store object properties in variables at runtime and set a cookie to write them to the viewer’s
hard disk. This is possible for selected properties of the browser window, such as background color.
To useavariable in apage, youmustdeclare it with theDeclare Variable action first. Afterdeclaring avariable, you
may want to initialize it with the Init Variable action.
Declare Variable
To use a variable in a page, you must declare it with the Declare Variable action first.
Trigger the action with a browser-triggered event set to onParse in the head section of the page. Choose Action >
Variables > Declare Variable.
Enter a unique name in the Name text box. Choose an appropriate data type from the Type menu:
Boolean Any on/off state.
Integer Any integer value.
Float Any floating point value.
String Any string value.
Layer Any layer in the current page.
Layer Position Location of a layer in the current page.
Image Any image in the current page.
URL Any URL in the current page.
Color Any color in the current page.
Scene Any scene in the current page.
OnCall Action Any action from the head section of the page whose trigger is set to OnCall.
Function Any function declared in the head section of the page.
Use the Cookie text box to enter the name of the cookie in which you want to store the value of the variable on the
viewer’s hard disk.Thenuse theWrite Cookie andReadCookieactions to setthe cookie andreadits content, respec-
tively.
DeleteCookie
DeleteCookie is a companion action to VisitorCookie. It lets you delete an existing cookie by entering the cookie’s
name. This is useful for testing the VisitorCookie action. For example, you might be sent to one page the first time
you test the VisitorCookie action, and then to another page on subsequent visits. By using the DeleteCookie action,
you can change the original page and still be able to revisit it.
Trigger the action with a user-triggered event, or a browser-triggered event set to OnLoad in the head section of the
page. Choose Action > Variables > DeleteCookie. For Cookie Name, enter the name of the cookie you want to delete.










