Attention: The code dialog is only interesting for advanced users, because it offers the possibility to enhance your projects by adding some Hollywood code.
Hollywood Designer only offers you a small part of the functions which Hollywood actually has. If you want to create a more complex project, you will most likely have to add a bit of Hollywood code. You can use this code dialog for that: The text editor in this dialog allows you to write Hollywood code which will be executed before the object (or the page) to which the code belongs will be displayed. If you have not programmed in Hollywood yet, it is recommended to read the chapter "Introduction to Hollywood programming" in the Hollywood documentation. This chapter explains to you on a few pages how you can use the Hollywood language.
The toolbar offers the following functions (from left to right):
You can also use special sequences in your code, which are recognized and translated by Hollywood Designer. The following sequences are currently recognized:
%>PAGEID
PAGEID
. You
can give every page an identifier in the page name dialog. Page
identifier must be unique in the whole project, which means that it
is not allowed that two pages share the same identifier.
%#PAGEID
PAGEID
(starting from 1). You can give every page an identifier in the page name dialog. Page
identifier must be unique in the whole project, which means that it
is not allowed that two pages share the same identifier.
%!OBJECTID
OBJECTID
has
occupied. So you can e.g. use Hollywood functions like MoveLayer()
or HideLayer()
to directly access your object. You can give your
objects identifiers in the object name dialog. Identifiers for objects
need to be unique in the page that contains them. There must not be
two objects with the same identifier in the same page. Note: Starting
with Hollywood Designer 3.0, you do not have to use this sequence any
longer because Hollywood Designer now automatically uses the identifier
of an object (UID) for the layer name. Thus, you can simply pass the
identifier of an object directly to the layer functions, for example
HideLayer("LOGOIMAGE") |
This will hide the object on the current page that has the UID
LOGOIMAGE
assigned to it.
%(OBJECTID
OBJECTID
. You can give your objects identifiers in the
object name dialog. Identifiers for objects need to
be unique in the page that contains them.
%)OBJECTID
OBJECTID
. You can give your objects identifiers in the
object name dialog. Identifiers for objects need to
be unique in the page that contains them.
%@SOUNDID
SOUNDID
. So you can
e.g. fade in a sound by calling SetVolume()
multiple times. Identifiers
for sounds can be set in the sound options dialogs for pages and objects.
Sound identifiers must be unique in your whole project because sounds can
be used everywhere (they are not limited to a single page).
%CURRENTPAGEINDEX
%CURRENTPAGEUID
%CURRENTPAGENAME