At 21:38 +0800 04/26/2002, noelle cheng wrote:

[osc]

>>It provides Director programmers with a more or less complete set 
>>of system widgets, specifically buttons of various types, popup and 
>>pulldown menus, scroll bars, little arrows, and sliders. All the 
>>system standard components you see in most programs, the ones that 
>>have the system look and feel, user-selected color and font 
>>choices, etc.
>
>Does this mean that the whole  program can be set at the beginning 
>before I start authoring?  Is this what you mean by system standard 
>components?

No, I believe what you're referring to is a template, and though such 
a critter would surely be nice, they don't exist for Director (not 
yet, not as far as I know).

What I mean by standard components is any regular button, menu or 
control that appears in most programs, including the control items 
that appear in many of Director's own windows. The closest approach 
you can make to those yourself is with the items in the Tool Palette 
and, while they surely are useful, they don't have a standard system 
look and feel any more. (Back when Director was Mac-only, up to the 
early 90s, those were standard looking components; they are not any 
more.)

The OSC Xtra will give you those standard looking components again. 
Plus they give you things that are otherwise rather difficult to 
program via Lingo alone, such as popup menus and sliders.

>Actually, what is your  personal opinion of it? I mean, I believe 
>that there are many Xtras in the market  so is this an Xtra worth 
>buying?

I use it in everything. Absolutely everything. I use it more often 
than I do FileXtra3 or BuddyAPI, which are also spectacularly useful 
Xtras.

>>You'd attach this to your up and down arrow sprites, set the 
>>properties so one would adjust the sound down and the other would 
>>adjust it up, and then whenever the user clicked the appropriate 
>>button the sound would get louder or softer.
>
>   I first create two arrows in the form of buttons, is that what you mean?

Yes. Then click the sprite and, in the PI behavior tab, select New 
Behavior from the popup. What I sent along before should be OK to 
copy and paste into the behavior's window. Then close the window and 
click the gear icon in the PI (or set the properties directly through 
the PI interface).

>>Or you could turn off the clicking entirely, and replace the 
>>mouseDown handler with this:
>>
>>    on mouseWithin me
>>      me.AdjustVolume()
>>    END mouseWithin
>
>I place this handler on both buttons?

No, you'd remove the mouseDown handler from the behavior and put the 
above in its place. It would be in the same behavior.

>This is only for channels 1 to 8?
>
>I need to specify something like  this? :
>
>PuppetSound  2, 0

That's the idea, yes.

>This also  means that the behavior  is independent of the system volume?

Yes, in theory anyway. ;)

>Actually, I am using QT music files.  You mentioned before that  the 
>sound channel range should not be 8, rather it  could go up to 1000.

Well, whichever sprite held the QT movie or sound file, yes. In order 
for that to work you would have to do a couple things. First you'd 
change the getPropertyDescriptionList exactly as you suggested; but 
you'd also change the AdjustVolume() handler a little:

   on AdjustVolume me
     if pyMyDirection = #down then
       sprite(pnMySoundChannel).member.volume = \
         sprite(pnMySoundChannel).member.volume - 1
     else
       sprite(pnMySoundChannel).member.volume = \
         sprite(pnMySoundChannel).member.volume + 1
     end if
   END AdjustVolume

This is because for QuickTime you adjust the volume of the *member* 
in the Cast, rather than a sound channel in the score. The above 
changes would do so by getting the Cast member associated with the 
sprite you had chosen to be affected by the volume button behavior, 
and then changing that Cast member's volume. Note this would not be a 
permanent change; the next time someone ran your movie the QuickTime 
sounds wouold be back to their original levels.

Apart from that it should work more or less as expected. ;)

-- 

              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://www.osborne.com/indexes/beginners_guides.shtml
[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