360
makeSubList()
Syntax
XMLnode
.makeSubList()
Description
Function; returns a property list from a child node the same way that
makeList()
returns the
root of an XML document in list format.
Example
Beginning with the following XML:
<?xml version="1.0"?>
<e1>
<tagName attr1="val1" attr2="val2"/>
<e2>element 2</e2>
<e3>element 3</e3>
</e1>
This statement returns a property list made from the contents of the first child of the tag
<e1>
:
put gparser.child[ 1 ].child[ 1 ].makeSubList()
-- ["tagName": ["!ATTRIBUTES": ["attr1": "val1", "attr2": "val2"]]]
See also
makeList()
map()
Syntax
map(
targetRect
,
sourceRect
,
destinationRect
)
map(
targetPoint
,
sourceRect
,
destinationRect
)
Description
Function; positions and sizes a rectangle or point based on the relationship of a source rectangle
to a target rectangle.
The relationship of the
targetRect
to the
sourceRect
governs the relationship of the result of
the function to the
destinationRect
.
Example
In this behavior, all of the sprites have already been set to draggable. Sprite 2b contains a small
bitmap. Sprite 1s is a rectangular shape sprite large enough to easily contain sprite 2b. Sprite 4b is
a larger version of the bitmap in sprite 2b. Sprite 3s is a larger version of the shape in sprite 1s.
Moving sprite 2b or sprite 1s will cause sprite 4b to move. When you drag sprite 2b, its
movements are mirrored by sprite 4b. When you drag sprite 1s, sprite 4b moves in the opposite
direction. Resizing sprite 2b or sprite 1s will also produce interesting results.
on exitFrame
sprite(4b).rect = map(sprite(2b).rect, sprite(1s).rect, sprite(3s).rect)
go the frame
end
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...