Hi,

At 01:46 PM 5/14/2002 -0500, you 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.


Does that mean that the music will not play properly?

But aren't you playing a QT file at a time?



>>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.


Am I to understand that you can do it with variables with spaces?



>>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


How would I use this script?  As a parent script?


   Concatenation of items are only done in parent scripts?



>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?



>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?



>>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.


How may a behavior not be attached to a sprite?  You mentioned before that 
it is  highly unlikely to have spriteless behaviors... yet now I have one?



>>>>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.




To initialize a variable, I set it to zero?  Is it possible to initialize 
it to other  than  zero?



>>>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?


Yes, they are all in a single frame,  and there is only one 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.


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.


Thank you

Noelle



[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!]

Reply via email to