DOMAJ DXLIB TIPS
How do I get the properties of a cast member?
MemberNum is returned by the Cast.FindUsedMemberIndex()
function
For all members you must loop through the cast until the membernum
is 0 eg
memberNum:=Cast.FindUsedMemberIndex(0);
while memberNum>0 do
begin
//do something
memberNum:=Cast.FindUsedMemberIndex(memberNum);
end;
Membertypes:
If you wish to check all membertypes then you must define a symbol
memberType:=SymbolManager.CreateSymbol('TYPE') ;
and additionally a symbol for each type of member you are wanting to
check eg Code:
scriptType:=SymbolManager.CreateSymbol('SCRIPT') ;
and then check if the TYPE returned is equal to your defined symbolType
(SCRIPT) eg
r:=Movie.getCastbyIndex(castNumber).CastMember[memberNum].GetProperty(memberType);
if r<>nil then
begin
if r.Symbol=scriptType then
..
Of course you can also check for a specific property
if it is not the TYPE that you need to retrieve eg scriptText without
checking the memberTYPE as DXLIB is very forgiving.
DXLIB TIPS INDEX
- When I use sendMessage, the message does not appear
in the Director message window. Why?
- How do I return a value to Director?.
- What is the results interface?
- Field properties.
- How do I trigger the mouseUp handler?
- How do I add my own function to an asset?
- How do I add my own function to a sprite?
- How do I manipulate the score?
- How do I show delphi forms?
- How do I define and use my own variables?
- How do I create and and read global variables and
their values?
- How do I create a behavior?
- How do I trigger a script in Director?
- How do I get the properties of a cast member?(31Mar03)
- How do I manipulate casts?
- How do I debug an XTRA?
- How do I draw a castmember icon?
- How do I add my own resource file bitmap as the
castmember icon?
- How do I add a Director property interface
- Using the bitmap media property of a castmember
(30Apr02)
- How do I return a list to Director (09May02)
- How to create, execute and delete a Director script
(08Oct02)
- How to create a Director Bitmap (09Oct02)
- How to export a Director Bitmap (15Oct02)
DOMAJ Links
