3 Replies Latest reply on Dec 8, 2006 4:08 PM by razta101

    mouseUp twice

    razta101
      Hello again,
      Im trying to change a cast member from one to another once its been cliked and then change it back again once it has been clicked again.

      Ive got an image of a speaker, and what I want to do is when it has been clicked to change to a cast member with a speaker and a cross over it to show that the music is off and then when its clicked again to change back to the original cast member to show the music is on.

      Any help apretiated,
      Thank you,
      Ryan
        • 1. Re: mouseUp twice
          Level 7
          I'm guessing there are about 50 ways to do this and here is just one.

          property pS, spriteNum, pStartMem, pNewMem

          on beginSprite me
          pS = sprite (spriteNum)
          pStartMem = pS.member.name
          pNewMem = pStartMem & "_new"
          end

          on mouseUp me
          if pS.member.name = pStartMem then
          pS.member = pNewMem
          else
          pS.member = pStartMem
          end if
          end

          --
          Craig Wollman
          Lingo Specialist
          Word of Mouth Productions
          212-928-9581

          www.wordofmouthpros.com
          "razta101" <webforumsuser@macromedia.com> wrote in message
          news:elaadd$e58$1@forums.macromedia.com...
          > Hello again,
          > Im trying to change a cast member from one to another once its been cliked
          > and
          > then change it back again once it has been clicked again.
          >
          > Ive got an image of a speaker, and what I want to do is when it has been
          > clicked to change to a cast member with a speaker and a cross over it to
          > show
          > that the music is off and then when its clicked again to change back to
          > the
          > original cast member to show the music is on.
          >
          > Any help apretiated,
          > Thank you,
          > Ryan
          >


          • 2. Re: mouseUp twice
            Level 7
            Sorry, I forgot to mention that the name of the cast member that has the x
            needs to be the same as the cast member without the x except is should have
            "_new" after it.

            cast member without x: anynameyouwant
            cast member with x: anynameyouwant_new

            --
            Craig Wollman
            Lingo Specialist
            Word of Mouth Productions
            212-928-9581

            www.wordofmouthpros.com
            "forum.macromedia.com" <lingoboy@wordofmo.com> wrote in message
            news:elakda$onu$1@forums.macromedia.com...
            > I'm guessing there are about 50 ways to do this and here is just one.
            >
            > property pS, spriteNum, pStartMem, pNewMem
            >
            > on beginSprite me
            > pS = sprite (spriteNum)
            > pStartMem = pS.member.name
            > pNewMem = pStartMem & "_new"
            > end
            >
            > on mouseUp me
            > if pS.member.name = pStartMem then
            > pS.member = pNewMem
            > else
            > pS.member = pStartMem
            > end if
            > end
            >
            > --
            > Craig Wollman
            > Lingo Specialist
            > Word of Mouth Productions
            > 212-928-9581
            >
            > www.wordofmouthpros.com
            > "razta101" <webforumsuser@macromedia.com> wrote in message
            > news:elaadd$e58$1@forums.macromedia.com...
            >> Hello again,
            >> Im trying to change a cast member from one to another once its been
            >> cliked and
            >> then change it back again once it has been clicked again.
            >>
            >> Ive got an image of a speaker, and what I want to do is when it has been
            >> clicked to change to a cast member with a speaker and a cross over it to
            >> show
            >> that the music is off and then when its clicked again to change back to
            >> the
            >> original cast member to show the music is on.
            >>
            >> Any help apretiated,
            >> Thank you,
            >> Ryan
            >>
            >
            >


            • 3. Re: mouseUp twice
              razta101 Level 1
              Thank you very much, that worked a treat.