Hi, At 09:59 AM 4/25/2002 -0500, you wrote:
>>>The simplest thing in the universe might be to convince the powers that >>>be at your company to spring for the OSCXtra suite from peghole.com. >>>These Xtras include all types of system standard components (or >>>widgets), including menus, buttons and sliders. >> >>This will not be easy. > >Yeah, I know what you mean. They want you to move the entire planet, but >won't give you even a moderately-sized lever with which to start pushing. >Well, you can't be an automotive mechanic if you do not have wrenches. Thank you for understanding... >>Could you elaborate further please? I find that the documentation on the >>site is inadequate and consists largely of promotion of their product. >>What exactly does it do? Is it so ' wonderful' as claimed? > >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? 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? It�s a pity that everything is quoted in US$ though. Everything becomes twice as expensive. >>>You could insert an OSC slider in your score and attach a couple >>>behaviors to it, and you'd be done. (It's not exactly that easy, but >>>it's close.) >> >>What behaviors are you talking about please? Is it so easy? > >Almost. The OSC suite comes with behaviors, one of which gives you a lot >of nice options for the slider -- including being able to set its value >range, and what handlers are to be called when the user is operating it. >The handlers in question would be the ones you'd use to actually set the >system volume, and that's the extent of the scripting you'd have to do. Now I�m almost wishing I had one of this� >>By the way is this the only solution? > >For setting system volume? Not by any means. A slider's not necessary >unless you're committed to the idea. Yes, I�m open to anything which works. > There are other ways you could do it, as with up and down arrows, for > instance. Here's an example behavior for that: > > PROPERTY pnMySoundChannel -- Which sound channel is being set > PROPERTY pyMyDirection -- Volume up, or down? > > (....) > on getPropertyDescriptionList me > lProps = [:] > lProps.addProp( #pnMySoundChannel, [#default: 1, #format: #integer,\ > #comment: "Which sound channel?", #range: \ > [#min:1, #max:8] ] ) > lProps.addProp( #pyMyDirection, [#default: #down, #format: #symbol,\ > #comment: "Adjust sound down or up?" #range: \ > [#down, #up] ] ) > return lProps > END getPropertyDescriptionList > >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? >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? >Then all the user has to do is point to the appropriate button, and the >sound gets louder or softer. > >Note, by the way, that this will affect only sound *channels* in playback, >when they're being used in conjunction with a command such as puppetSound. This is only for channels 1 to 8? I need to specify something like this? : PuppetSound 2, 0 >This won't affect the loudness of a file playing off disk as with sound >playFile, and it won't affect the computer's overall system volume. For the sound to be played properly, sound playFile requires that the correct MIX Xtra must be available to the movie, usually in the Xtras folder of the application? This also means that the behavior is independent of the system volume? I notice that you took the time and effort to write more code� 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. May I amend it to this: the Get Property Description List? PROPERTY pnMySoundChannel -- Which sound channel is being set PROPERTY pyMyDirection -- Volume up, or down? on beginSprite me me.SetParams() END beginSprite on mouseDown me repeat while the stillDown me.AdjustVolume() end repeat END mouseDown on SetParams me if voidP ( pnMySoundChannel ) then pnMySoundChannel = 1 end if if voidP ( pyMyDirection ) then pyMyDirection = #down end if END SetParams on AdjustVolume me if pyMyDirection = #down then the volume of sound pnMySoundChannel = \ the volume of sound pnMySoundChannel - 1 else the volume of sound pnMySoundChannel = \ the volume of sound pnMySoundChannel + 1 end if END AdjustVolume on getPropertyDescriptionList me lProps = [:] lProps.addProp( #pnMySoundChannel, [#default: 1, #format: #integer,\ #comment: "Which sound channel sprite?", #range: \ [#min:1, #max :( the lastChannel ) ] lProps.addProp( #pyMyDirection, [#default: #down, #format: #symbol,\ #comment: "Adjust sound down or up?" #range: \ [#down, #up] ] ) return lProps END getPropertyDescriptionList Thank you for your help 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!]
