Lingo Dictionary
117
•
This is the ancestor script:
-- script "animal"
property legCount
on new me, newLegCount
set legCount = newLegCount
return me
end
on run me
put "Animal running with "& legCount &" legs"
end
on walk me
put "Animal walking with "& legCount &" legs"
end
•
The following statements use the parent script and ancestor script.
This statement creates an instance of the parent script:
set m = new(script "man")
This statement makes the man walk:
call #walk, m
-- "Animal walking with 2 legs"
This statement makes the man run:
set msg = #run
callAncestor msg, m
-- "Animal running with 2 legs"
This statement creates a second instance of the parent script:
set m2 = new(script "man")
This statement sends a message to the ancestor script for both men:
callAncestor #run,[m,m2]
-- "Animal running with 2 legs"
-- "Animal running with 2 legs"
See also
ancestor
,
new()
callFrame()
Syntax
sprite(
whichSprite
).callFrame("
FlashLabel
")
sprite(
whichSprite
).callFrame(
FlashFrameNumber
)
Definition
Command; used to call a series of actions that reside in a frame of a Flash movie sprite. You can
specify which frame to call using a frame number or a label. This command sends a message to
the Flash ActionScript engine and triggers the actions to execute in the Flash movie.
Example
This Lingo executes the actions that are attached to frame 10 of the Flash movie in sprite 1:
sprite(1).callFrame(10)
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...