>How about prepareMovie ? Where does this fit in? Would this not
>initialize the movie even before beginSprite?
You're right. prepareMovie happens before beginSprite, and is usually used
to initialize global things.
I like to think of movie events as opportunities to do generalized things,
sprite events to do sprite-specific things, and frame events to handle
time-based stuff.
>I always thought programming is logic � either it works or it doesn�t.
That's valid. There are often many ways to get something to work right,
though, especially in Director. Director has tremendous flexibility. It's
part of Director's power, but also one of the things that makes learning
Director more difficult.
>My code doesn�t work 99% of the time.
Time and experience will change that. I've been programming 20 years, and
I've gotten it down to where my code only fails 90% of the time.
>>>repeat with i = 1 to 100
>>>--what should be the command here? GoTo? I am not sure.
>>>repeat with sprNum = 1 to 20
>>>end repeat
>>>set the LocH of sprite sprNum = (the LocH of sprite sprNum)-i
>>>end repeat
>>>end
Ok, this will work:
repeat with i = 1 to 100
repeat with sprNum = 1 to 20
sprite(i).locH = sprite(i).locH - 1
end repeat
end repeat
>locH must be set at the beginning. I didn�t do that.
Actually, locH is a sprite property that exists whether you set it or not.
Wherever a sprite is, there it is. Changing the locH changes the sprite's
horizontal location.
>>I'm not being intentionally obtuse, but 'string' can have two meanings.
>>One is to convert something to a string--e.g., string(10) returns the
>>string "10" instead of the number 10.
>
>Could you elaborate, please? I do not understand.
Look up the string() function in the Lingo dictionary. It's used to convert
other data types to a string. There is a difference between the string "10"
and the number 10. One is a character string, and the other is a number
that you can do math with.
>The getPropertyDescriptionList is used as a function to create a property
>list ? Is this what you mean?
Close. getPropertyDescriptionList does create a property list which is used
to initialize some property values for a sprite behavior.
Don't get confused and think you need to always use it to create a property
list, though. Read up on property lists--the Lingo dictionary, in the
section on Lingo by topic, gives the commands. Bruce's book Lingo in a
Nutshell covers them well also--much better than I can in an e-mail. He's a
better writer than I am anyway.
>But this List can also be used as a movie or frame event?
The list you set with getPropertyDescriptionList is set when you attach the
behavior to the sprite. It's something Director does automatically for you.
You can see it in action when you attach one of Director's library
behaviors, like rollover member change. When you attach that, a dialog box
pops up--that's activated by getPropertyDescriptionList.
Cordially,
Kerry Thompson
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]