This handler returns a list of all scripts and their properties on a sprite.
Call like this... var = returnProps(sprite(1))
--Copyright 2000 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know. :-)
on returnProps whatItem
sList = whatItem.scriptInstanceList
p_list = []
repeat with x = 1 to sList.count
p_list.add([#name : whatItem.scriptList[x][1].name, #properties : [:]])
repeat with y = 1 to sList[x].count
p_list[x][#properties].addProp(getPropAt(sList[x], y), sList[x][y])
end repeat
end repeat
return p_list
end
on getBehaviorDescription me
return "This handler returns a list of all scripts and their properties on a sprite." & return & "Call like this..." & return & "var = returnProps(sprite(1))"
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA