Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
DAlign
DirectTransition3D Xtra Set I
Director Web
new Rollover JB
Find CD Drive Letter
import and play sound file (during runtime)
Print WYSIWYG formatted text in Windows through Director
Multiple-timer facility
Font Size DropDown
Final text box resizer for text members
 

 

 

Behavior Retrun Properties on a Sprite

Added on 6/28/2000

 

Compatibilities:
D8 Mac PC Script Shockwave

This item has not yet been rated

Author: MediaMacros (website)

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

Send e-mail