Hi,

At 10:28 AM 5/14/2002 -0500, you wrote:

>>>So here it is. This is another take on the volume button behavior for 
>>>QuickTime audio. There are three behaviors here. One is attached to the 
>>>volume button; one is attached to the target QuikckTime audio sprite(s); 
>>>the third is a framescript behavior and goes into channel 0. This third 
>>>behavior is the intermediary that prevents direct communication amongst 
>>>behaviors and thus forestalls script error occurrences.
>>
>>Need  the intermediary always  be a frame script?
>
>No, it can be attached to a sprite somewhere. I put it into a framescript 
>here to simplify sprite messaging. Framescripts are always sprite 0.
>
>>>As you can see this is relatively intricate, but it's got the distinct 
>>>advantage of being pretty flexible. You can actually have as many QT 
>>>sprites as you want in a frame,
>>
>>How do I have as many QT sprites as I want in a frame?
>
>Put as many as you want to into that frame.
>
>>Does not a frame contain only 1 sprite?  I am confused.
>
>A frame can contain up to 1000 sprites. Each channel in a frame can hold a 
>sprite.



So if I have 10 QT sprites in a frame, I can display 10  QT sprites on the 
stage at the same time?

And these 10 QT  sprites will appear in 10 channels?


How is a user to know then which QT sprite to click on? Wouldn't there be a 
conflict? And you can't have more than one QT sprite  playing at  a time?


>>What is the purpose of  me.InitializeMyProps()?
>
>It is a call to a handler to make sure that there are valid valuse 
>assigned to the property variables in the behavior.
>
>>If there is no QT sprite, then where is "No QT sprite has been set for 
>>behavior"  placed?
>
>Into the message window -- 'put' tells Director to send whatever follows 
>to the message window. Generally you only have that in author mode.


Thanks for telling me this. I did not receive any message here.



>>What is the meaning of sendSprite here?
>
>sendSprite is a command that sends instructions to another sprite, telling 
>it to execute another handler.
>
>>>    on InitializeMyProps me
>>>      if voidP ( psMyName ) then
>>>        psMyName = "no_sprite_" & (me.spriteNum)
>>>      end if
>>>    END InitializeMyProps
>>
>>Should there be two && here?
>
>No, I wanted the variable to concatenate without a space, so I used the 
>single &, not the double.




To concatenate is to link together, isn't it?  Why would you want a 
variable to link together without a space?

Actually, what is the purpose of concatenating variables?



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



>>>    on ReturnInfo me
>>>      return psMyName && (me.spriteNum)
>>>    END ReturnInfo
>>
>>What is the purpose of on ReturnInfo me?    You are calling it in the 
>>channel 0 script? Why?
>
>There is another handler that makes use of this command. That's how the 
>other behaviors know which sprites have QuickTime audio adjusting 
>behaviors attached.



>>>    on AdjustQTVolume me, nIncrement
>>>      if sprite(me.spriteNum).member.type <> #quickTimeMedia then
>>>        put "Sprite" && (me.spriteNum) && "is not a QuickTime sprite."
>>>        exit
>>>      end if
>>>      sprite(me.spriteNum).volume = \
>>>        sprite(me.spriteNum).volume + nIncrement
>>>    END AdjustQTVolume
>>
>>Is this another test for the volume?
>
>No, it's a test to determine if the target sprite is QuickTime. If it is, 
>volume is adjusted. Otherwise you get an error message in the message window.


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?



>>What is the meaning of "Sprite" && (me.spriteNum) && "is not a QuickTime 
>>sprite"? Is this stringing variables?
>
>It's putting together a message as text, to be put into the message window.
>
>>What is the meaning of    plQTSpriteList = [:]?
>
>I'm setting a variable to an initial empty value.


Why did you do this?



>>I do not understand. What are you doing here?
>>
>>
>>>    on AdjustVolume me, yDirection, sTarget
>>>      nSprite = plQTSpriteList[sTarget]
>>>      if voidP ( nSprite ) then
>>>        put "Sprite" && sTarget && "is not registered as a QT sprite."
>>>        exit
>>>      end if
>>>      if yDirection = #up then
>>>        nAdjustIncrement = 1
>>>      else
>>>        nAdjustIncrement = -1
>>>      end if
>>>      sendSprite ( nSprite, #AdjustQTVolume, nAdjustIncrement )
>>>    END AdjustVolume
>>
>>This is another test for volume?
>
>No, it's another failsafe check the validity of a sprite. If a sprite gets 
>moved, or a behavior gets misattached, the dynamics of the behaviors might 
>change -- and so they have to have methods built in to handle possible 
>errors without actually causing the program to stop functioning.
>
>>All my rollover changes on all the sprites had disappeared.  So did 
>>all  my jump to  various markers like quit, back  and  next .  Why?
>
>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?


>>Then  I tried to place back all  my rollovers and the rollover 
>>changes.  I received this message:
>>
>>'An error  occurred. Property access error. Argument out of valid 
>>range.'  Why did this  have to happen?
>
>Again, I don't know. There's simply no way to answer that kind of question 
>without actually being present in the room with you, unfortunately.
>
>>On playing the movie, and clicking the volume control button, I was 
>>unable to make the volume increase or decrease.  When I created a new 
>>program and put in only the volume control buttons and the QT music 
>>sprite together with the scripts you had written, there was still  no 
>>changes in the volume.
>>
>>I really sorry, but where is my mistake?
>
>Again, I don't know. How did you attempt to get the file to work?


Sorry, the file 'works' in the sense that I could copy and paste the 
scripts into my current Director movie without errors. Other than that, it 
doesn't work.


>  In what way did you attach the behaviors?

Using the PI . Is this incorrect?

>  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



Why was the QT sprite not recognised?


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