At 22:20 +0800 05/15/2002, noelle cheng wrote:
>>There is nothing preventing you from putting 10 QT sprites in a
>>frame, but in the specific cases of QuickTime and Flash, it's not a
>>good idea to do so, because there will be performance problems on
>>slower computers. This can result in jerky animation or audio
>>stutters.
>
>Does that mean that the music will not play properly?
It might not.
>But aren't you playing a QT file at a time?
If your user has several of them going at once, no. If you have
several of them appear at once and have not explicitly paused them,
no; or at least not necessarily.
>>It was simply the way I chose to do that part of the behavior;
>>there is no deeper mystery involved. I mean there is no technical
>>reason to prefer doing it that way, just as there is no technical
>>reason to us 'n' for integer variables. It's a question of style.
>
>Am I to understand that you can do it with variables with spaces?
You can put almost anything you want to into a variable, including
spaces -- but some data types won't accept some things, such as
number or symbol formats. They won't lat you use spaces. Symbols
won't allow punctuation either.
>> on MakeRandomPhrase
>>
>> lSubjects = [ "Noelle", "Howdy", "Lingo" ]
>> lVerbs = [ "sleeps", "eats", "creates" ]
>> nSubj = random ( lSubjects.count )
>> nVerb = random ( lVerbs.count )
>> sSubj = lSubjects[nSubj]
>> sVerb = lVerbs[nVerb]
>> put sSubj && sVerb & "."
>>
>> END MakeRandomPhrase
>
>How would I use this script? As a parent script?
No, it's just a movie script. Nothing elaborate about it. After
entering it you can call it in the message window.
>>This creates two lists of words, one of nouns (subjects) and the
>>other of verbs. The simplest syntax for a legitimate English
>>sentence is subject and verb, and what this does is make very
>>simple, but randomly selected and grammatically valid, sentences --
>>which it then puts into the message window. (Of course some of
>>those sentences -- "Lingo eats" -- are nonsensical, but they're
>>still syntactically valid.)
>
>So the stringing of variables occur only at author-time?
No, it occurs when the handler is called, whether in a projector or
not. But generally the only place you'll have a message window is in
authortime.
>>As you can see the 'put' statement uses both forms of concatenator,
>>the first to string together the subject and verb into a phrase,
>>the second to add a period to the end of the sentence.
>>
>>The script would be entered as a plain movie script, after which
>>you could call it from the message window to see the sentences it
>>builds.
>
>What is the purpose of a string in this context?
I was using the term to imply the way one places beads on a string to
make a necklace. In programming specifically, a string is any
variable that is made of words or sentences (braodly speaking).
Strings are indicated by double-quotes.
>>The QuickTime behavior, it would seem, was not attached to the
>>QuickTime sprite, which prevented it from sending its own reference
>>to the communication behavior, thus preventing the communication
>>behavior from registering it as a QuickTime sprite.
>
>How may a behavior not be attached to a sprite?
The simplest way is for it to not have been attached in the first place.
>>It's good practice to do so. Theoretically one does not have to
>>initialize variables like this, at least not especially rigorously,
>>but I've found it's a good habit to do so.
>
>To initialize a variable, I set it to zero? Is it possible to
>initialize it to other than zero?
You can initialize a variable to contain anything, as long as you're
taling about a valid type of data Director can handle. When I start
with a zero value it generally means I'm about to do something else
with the variable, such as put a nonzero in it. But I don't stick to
zero. I do my initialization based on what is more or less the null
value for the data type.
That is, a list variable's "empty" state would be to contain an empty
list, [] (or [:] for a property list). Hence these variables all have
conceptually the same value -- null or empty -- but their
initialization indicates the kind of data they're expected to hold
later on:
lOneList = []
lAnotherList = [:]
sName = ""
nDay = 0
fBankBalance = 0.0
yIndex = #null
>When I set the breakpoint in the mouseUp handler, this is the
>message I receive:
>
>me = <offspring ''''' 34802b8>
>
>psTargetName= "a"
>pyMyDirection = #up
>spriteNum =11
>
>
>on the left, it says onMouseUp
>
>This is for the increase volume button.
>
>Where is the error? The code does execute.
You need to step through the code to see where it goes from there.
Getting the debugger to open is only the first part of that process.
--
Warren Ockrassa | http://www.nightwares.com/
Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
http://shop.osborne.com/cgi-bin/osborne/0072195622.html
[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!]