2 Replies Latest reply on Oct 15, 2006 9:21 AM by Newsgroup_User

    Sound button Problem - Please Help

    Hlias
      Hello all, i have no big experience with lingo.
      I am making a cd-rom for a town in Greece and what i want to do is this: I have two channels of sound. In the channel one i have put the narration and in the chanel two a background sound. I want to have a button (an icon) which when you click on it you could turn the narration off and on, in other words an off/on button for the narration. Is it possible to have two sprites for one button ? I mean when you click the sound off the sprite will change its colour to red and when you click on it will change its colour to white.
      It may be very simple but i cant figure out how you can do this...
        • 1. Re: Sound button Problem - Please Help
          nevereasy
          In the behavior library, there is a multi-State button, in controls. It might do the job you are after.
          • 2. Re: Sound button Problem - Please Help
            Level 7
            Hi Hlias,

            This is a very simple switch behavior for sound-on/off and showing a
            different graphic to go with it. It mutes the channel if it's volume is
            greater than zero and sets it's volume to 200 if not.

            on mouseUp me

            if ( sound(2).volume > 0 ) then
            sound(2).volume = 0
            sprite(me.spriteNum).member = member("snd_off")
            else
            sound(2).volume = 200
            sprite(me.spriteNum).member = member("snd_on")

            end if

            end

            Manno

            Hlias wrote:
            > Hello all, i have no big experience with lingo.
            > I am making a cd-rom for a town in Greece and what i want to do is this: I
            > have two channels of sound. In the channel one i have put the narration and in
            > the chanel two a background sound. I want to have a button (an icon) which
            > when you click on it you could turn the narration off and on, in other words an
            > off/on button for the narration. Is it possible to have two sprites for one
            > button ? I mean when you click the sound off the sprite will change its colour
            > to red and when you click on it will change its colour to white.
            > It may be very simple but i cant figure out how you can do this...
            >
            >

            --
            ----------
            Manno Bult
            manno@xs4all.nl