I'm going to make a guess that you are talking about the popups that
you see when you attach a behavior to a sprite. If this is what you
are talking about, here's what happens.
A behavior can have a special handler called "on
getPropertyDescriptionList". In that handler a programmer can build
a description (as a long property list) of properties and values that
a user can choose for those properties. Here is one example:
property pSomePropertyVariable
on getPropertyDescriptionList me
lDescription = [:]
addprop(lDescription, #pSomePropertyVariable, [\
#comment:"Choose an initial value:", \
#format:#string, \
#default:"A",\
#range:["A", "B", "C"]])
return lDescription
end
This behavior has a property variable called pSomePropertyVariable.
The getPropertyDescriptionList is activated when you attach this
behavior to a sprite. It will create a popup list and ask the user
to choose one value from A, B, and C (with the default answer being
A). The user's choice is actually stored in the score. This is
because this same behavior can be used in multiple places, even in
multiple places in the same frame in the score.
When you are writing other parts of this behavior, you can use the
value of this property to make the behavior do different things. An
example would be something like this:
on mouseUp me
case pSomePropertyVariable of
"A":
-- do something when the value is A
"B":
-- do something else when the value is B
"C":
-- do something else when the value is C
end case
end
As for how you generate the list used in the #range part within the
getPropertyDescription list, that is completely up to you. You can
use create a list of member names in your cast if you wish.
Something like:
memberList = ["Thismembername", "ThatMemberName",
"SomeOtherMemberName", etc.]
Then you can use this list like this:
on getPropertyDescriptionList me
lDescription = [:]
memberList = ["Thismembername", "ThatMemberName",
"SomeOtherMemberName", etc.]
addprop(lDescription, #pSomePropertyVariable, [\
#comment:"Choose an initial value:", \
#format:#string, \
#default:memberlist[1],\
#range:memberlist])
return lDescription
end
You could also make this dynamic and build up a list of members by
scanning through one or more castlibs. But I'll leave this up to you.
Good luck,
Irv
At 12:46 PM +0530 12/24/01, [EMAIL PROTECTED] wrote:
> Placed At :
>
>
>Hi all,
>I have problem in the properties ...in the dialogue box type of an input. An
>property is received from a drop down parameter input box to take
>that value for
>a button graphic from a cast.
>1. The casts are in the cast.
>2. There is shape member in the score the behavior attached to it
>... a property
>stores a the button memer's graphic . Any number of shape members can be there
>.Different member for different frames.
>3. when the button "mouse down "state the downstate is automatically
>to be taken
>from the details given in the property.
>4. Where is this value stored?
>5. How to retrieve it?
>I want to use this type of the reusable property and how to use that
>pls help me
>...
>Regards,
>Sathya.
>
>
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
--
Lingo / Director / Shockwave development for all occasions.
(Home-made Lingo cooked up fresh every day just for you.)
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]