At 01:02 +0800 05/15/2002, noelle cheng wrote:
>So if I have 10 QT sprites in a frame, I can display 10 QT sprites
>on the stage at the same time?
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.
>How is a user to know then which QT sprite to click on?
You don't click the QT sprites for the audio -- you click buttons
associated with those sprites.
>To concatenate is to link together, isn't it? Why would you want a
>variable to link together without a space?
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.
>Actually, what is the purpose of concatenating variables?
There I was concatenating items together into a single string. That's
generally what concatenation is used for -- joining separate parts
together to form one string. For example:
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
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.)
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.
>>>If the property is void, then the command doesn't execute?
>>
>>If the property is void the command *does* execute.
>
>Sorry, but what does the command mean?
It tests to see if a variable has a legitimate value or not. If not,
the variable will be void -- so it puts a value into it in order to
prevent possible errors later on.
>Yes, the time I received an error message when I clicked both the
>volume up and down buttons.
>
>'sprite a is not registered as a QT sprite.'
>
>I named it sprite 'a' for simplicity. Why did I receive this message?
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.
>>>What is the meaning of plQTSpriteList = [:]?
>>
>>I'm setting a variable to an initial empty value.
>
>Why did you do this?
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.
>>I don't know. Nothing I wrote should have an adverse effect on
>>anything else, but you should know that there can only be one
>>*frame* script in a given frame.
>
>Yes the script you wrote for channel 0 right?
Yes, exactly.
>> In what way did you attach the behaviors?
>
>Using the PI . Is this incorrect?
No, that should work properly.
>> Did you get parameters dialog boxes, and did you set them up?
>
>The QT sprite, in the PI , under behaviors - there is a 'name of
>this sprite?' - I put a.
>
>The increase volume button sprite in the PI , under behaviors,
>-there is a 'name of target sprite?' - I put a
>
>there is a ' adjust sound down or up? ' - I put #up
>
>Actually there is an arrow button pointing downwards, and I have
>only two options - down or up.
>
>The decrease volume button sprite in the PI, under behaviors '
>there is a 'name of target sprite?' - I put a
>
>there is a ' adjust sound down or up? ' - I put #down
All those seem fine to me. All these items are in just one frame,
along with the framescript?
>Why was the QT sprite not recognised?
A good question. Start with the debugger -- set a breakpoint in the
mouseUp handler for one of the volume buttons and step through the
scripts. Perhaps in there someplace there will be evicence of a
failure in communication.
--
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!]