Name
AddMove -- add object to move list (V1.5)
Synopsis
[id] = AddMove(id, type, sourceid[, par1, par2, par3])
Function
This function adds an object to the move list specified by id. If the move list is not existing yet, it is created by this function. You can also pass Nil in id which will cause AddMove() to create a new move list in any case and return its id. Move lists are used for optimized drawing using DoMove(). The optional parameters par1, par2 and par3 specify different things depending on which object type you passed over.

The following types are currently supported by AddMove():

#BRUSH
Adds the brush with id sourceid to the move list; par1 specifies x-position and par2 the y-position for the brush; par3 is not used

#HIDEBRUSH
Hides the brush with id specified by sourceid; optional parameters are not used

#HIDELAYER
Hides the layer specified by sourceid; optional parameters are not used

#INSERTBRUSH
Inserts the brush specified by sourceid into the layer position specified by par3; par1 specifies the x-position for the brush and par2 the y-position; See InsertLayer for more information on inserting layers.

#LAYER
Adds the layer specified by sourceid to the move list; par1 specifies the x-position for the layer, par2 the y-position; new in Hollywood 4.0: par3 can be used to specify a visibility mode: 0 means "show layer", 1 means "hide layer", and 2 means "keep current visibility setting" (i.e. layer stays hidden if it is currently hidden); par3 defaults to 0 which means always show the layer even if it is currently hidden

#NEXTFRAME
Displays a new frame of an anim layer; par1 specifies the new x-position for the layer, par2 the y-position; par3 specifies the frame to be displayed; specify 0 to display the next frame, -1 to display the last frame of the animation (V2.0)

#NEXTFRAME2
Same as #NEXTFRAME but takes a layer id as sourceid; this makes it possible to address anim layers directly; par1 specifies the new x-position for the layer, par2 the y-position; par3 specifies the frame to be displayed; specify 0 to display the next frame, -1 to display the last frame of the animation (V2.5)

#REMOVELAYER
Removes the layer specified by sourceid from the background picture's layer cache; optional parameters are not used

#TEXTOBJECT
Adds the text object specified by sourceid to the move list; par1 specifies x-position and par2 the y-position; par3 is not used

#UNDO
Adds an Undo() operation to the move list; sourceid specifies the type of the object to be undone, par1 specifies the identifier of the object to be undone, par2 specifies the undo level; See Undo for details.

After you have filled the move list with objects you can call DoMove() to draw the new display.

Please note: It is not possible to have multiple objects of the same type and id in your move list. For example, you cannot do the following:

 
DisplayBrush(1, #LEFT, #TOP)
DisplayBrush(1, #RIGHT, #BOTTOM)

/* This will not work */
AddMove(1, #BRUSH, 1, #CENTER, #CENTER)
AddMove(1, #BRUSH, 1, #LEFTOUT, #TOPOUT)
/* This will not work */

DoMove(1)

The above code will not work because you are using brush 1 two times in the same move list. Hollywood does not know which brush to use then which leads to unpredictable results.

See DoMove for details.

Inputs
id
identifier of the move list or Nil to create a new move list
type
type of the object to add (see list above)
sourceid
depends on the specified type (see list above)
par1
depends on the specified type (see list above)
par2
depends on the specified type (see list above)
par3
depends on the specified type (see list above)
Results
id
optional: identifier of the move list; will only be returned when you pass Nil as argument 1 (see above)
Example
See DoMove


Show TOC