|
|
|
authoring method docSprite()
Added on 3/1/2004
|
-- RETURNS: string
-- PARAMS: int channnel, int frame
-- DESCR.: documents a sprite's scriptList as string
-- EXAMPLE: put docSprite(20,2)
on docSprite( aIntCh, aIntFr )
-- RETURNS: string
-- PARAMS: int channnel, int frame
-- DESCR.: documents a sprite's scriptList as string
-- EXAMPLE: put docSprite(20,2)
-- -- "
-- -- ** scripts on sprite(20) in frame(2/"label_A") ** --
--
-- myBhv {member 10, 1}
-- a: 20
-- b: 0
--
-- myBhv_02 {member 11, 1}
-- prop1: 20
-- prop2: 0
--
-- --/** scripts on sprite(20) in frame(2) ** --"
tStr = ""
if integerP(aIntCh) then
if integerP(aIntFr) then
beginRecording
tOldFrame = the frame
go frame(aIntFr)
if the framelabel=0 then
tFrameLabel = ""
else
tFrameLabel = QUOTE & the framelabel & QUOTE
end if
put RETURN & "-- ** scripts on sprite("&aIntCh&") in frame("&aIntFr&"/"&tFrameLabel&") ** --" after tStr
put RETURN after tStr
tScriptList = sprite(aIntCh).scriptList
repeat with i = 1 to tScriptList.count
tScript = tScriptList[i]
put RETURN & tScript[1].name after tStr
put TAB &"{member "& tScript[1].memberNum &", "& tScript[1].castlibNum &"}" after tStr
tSettings = value(tScript[2])
if listP(tSettings) then
repeat with j = 1 to tSettings.count
put RETURN &TAB& tSettings.getPropAt(j) &":"&TAB& tSettings[j] after tStr
end repeat
end if
put RETURN after tStr
end repeat
put RETURN & "--/** scripts on sprite("&aIntCh&") in frame("&aIntFr&") ** --" after tStr
go frame(tOldFrame)
endRecording
end if
end if
return tStr
end docSprite
|
|