Professional Web Applications Themes

controlling puppetSound volume - Macromedia Director Lingo

Set the sound(sndChannelNum).volume where "sndChannelNum" is the sound channel number( can be 1 to 8 ).By default it is 1. i.e. sound(1).volume=sprite(23).volume --Ram "pixelguy" <webforumsusermacromedia.com> wrote in message news:bkqd9r$5pl$1forums.macromedia.com... > Can you control the volume of a puppetSound? > > I have a simple volume control (with plus and minus buttons, not a slider) that is used to control the volume of some QuickTime movies. I also have some sound effects that play whenever a button is rolled-over or pressed, via puppetSound. The volume control changes the QT volume, but the puppetSound volume remains constant. > > Here's my code: ...

  1. #1

    Default Re: controlling puppetSound volume

    Set the sound(sndChannelNum).volume where "sndChannelNum" is the sound
    channel number( can be 1 to 8 ).By default it is 1.

    i.e. sound(1).volume=sprite(23).volume

    --Ram


    "pixelguy" <webforumsusermacromedia.com> wrote in message
    news:bkqd9r$5pl$1forums.macromedia.com...
    > Can you control the volume of a puppetSound?
    >
    > I have a simple volume control (with plus and minus buttons, not a slider)
    that is used to control the volume of some QuickTime movies. I also have
    some sound effects that play whenever a button is rolled-over or pressed,
    via puppetSound. The volume control changes the QT volume, but the
    puppetSound volume remains constant.
    >
    > Here's my code:
    >
    > on mouseEnter
    > cursor 280
    > sprite(23).memberNum = 11
    > puppetsound "36knock"
    > on mouseUp
    > cursor -1
    > puppetsound "36whit"
    > if sprite(28).volume < 1 then
    > sprite(28).volume = 0
    > else
    > sprite(28).volume = sprite(28).volume - 40
    > end if
    > end
    >
    > 36knock is one puppetSound, a very short .wav file
    > 36whit is another very short puppetSound .wav file
    > sprite(28) is my QT file
    > sprite(23) is my button to decrease the volume
    >
    > By the way I'm a Lingo infant so keep that in mind.
    > Thanks in advance for the help!!
    >
    > andy
    >
    >

    Ram Guest

  2. #2

    Default Re: controlling puppetSound volume


    --Without going into how you could improve your volume controller the first thing you need to do is declare a channel for the puppetsprite :


    puppetsound 4, "36knock" (you can use channels 1 - 8 but be aware some media defaults to channel 8)

    -- now you can control the volume of the puppet's channel :

    sound(4).volume = myvolume

    -- This way you can have multiple puppets working at different volumes in different channels.


    Hope this is helpful
    rich




    rick@mcorp webforumsuser@macromedia.com Guest

  3. #3

    Default Re: controlling puppetSound volume

    thanks for the replies!

    I don't yet understand the logic behind setting my own variables. Can someone give me a quick idea?

    Also, where would I put this line:
    > puppetsound 4, "36knock" (you can use channels 1 - 8 but be aware some media defaults to channel 8)
    Should I put it with my "on mouseEnter" and "on mouseUp" commands?

    RAM:

    Is the sprite(23) in your message supposed to be my puppetsound? Right now it's the sprite that is the Minus-volume button. How does what you suggested control my puppetsound volume?

    Sorry I'm so dense with this. Once I "get" the logic behind Lingo I think I'll be a lot better off.

    Thanks again!!

    andy



    pixelguy webforumsuser@macromedia.com Guest

  4. #4

    Default Re: controlling puppetSound volume

    Thanks for the help! I still don't get how to set a variable and use it wherever I want, but that's OK, I'll figure that out later.

    This is a great resource!

    andy



    pixelguy webforumsuser@macromedia.com Guest

Similar Threads

  1. puppetsound
    By _pixel webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 5
    Last Post: October 22nd, 01:07 PM
  2. sound playfile or puppetsound?
    By houkah webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 2
    Last Post: August 4th, 06:22 PM
  3. How to determine if a volume is a remote volume
    By Jhnny Fvrt (it means genetic antagonism) in forum Mac Programming
    Replies: 0
    Last Post: July 25th, 06:37 AM
  4. when volume changes a beep sounds at the new volume
    By Doug in forum Windows XP/2000/ME
    Replies: 0
    Last Post: July 12th, 08:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139