2 Replies Latest reply on Mar 29, 2014 9:11 AM by heynewt

    Newbie.  Can't get rollOver to work

    heynewt Level 1

      Hi,

       

      Using Director 12 trial.

       

      I've been off of Director for 12 years.  I used to know a little Lingo, but I've forgotten most of it.  Came back to Director to do a simple interactive menu that launches different QT movies.  All of the limited scripting I've done so far is working, except for rollOver command.

       

       

      Nothing I do will get a rollOver response.  So simple, but can't figure out why it's not working.

       

      simple example...

       

      >>

      on exitFrame me

           go to frame

       

           if rollOver(12) then beep

           else nothing

       

      end if

       

      end

      <<

       

      lIke I said, my other scripts work fine.  But rollOver isn't working.  I'm trying to get buttons to highlight as they're rolled over.

       

       

      Robert N.

        • 1. Re: Newbie.  Can't get rollOver to work
          piXelSkiLLs Level 2

          on exitFrame me

           

            if rollOver(12) then

              beep

            else

              nothing

            end if

           

            go to the frame

          end

           

           

          examples of behavior applied on a sprite //


          Property pMe
          Property pMeColor
          Property pMeRollOverColor

           

          on beginSprite me
            pMe = sprite(me.spritenum)
            pMeColor = 10 (grey)
            pMeRollOverColor = 0 (white)
           
            sprite(pMe).forecolor = pMeColor
            end


          on exitFrame me
           
            if  rollover (pMe) then
             
              sprite(pMe).forecolor = pMeRollOverColor
            else
              sprite(pMe).forecolor = pMeColor 
            end if
           

          go to the frame
          end

           

          on mouseUp (me)

          --whatever

          end

          --------------


          Property pMe
          Property pOrigMember
          Property pRollOverMember

          on beginSprite me


          pMe = sprite(me.spritenum)
          pOrigMember = member "black" -- bitmap Castmember
          pRollOverMember = member "white"  -- bitmap Castmember
           
          sprite(pMe).member = pOrigMember

          end


          on exitFrame me
           
            if  rollover (pMe) then
             
             sprite(pMe).member = pRollOverMember
            else
              sprite(pMe).member = pOrigMember
            end if
           
            go to the frame
          end

           

           

          on mouseUp (me)

          --whatever

          end

          • 2. Re: Newbie.  Can't get rollOver to work
            heynewt Level 1

            Thanks so much.  I got it to work by using MouseEnter handler.  But your code is much more efficient, and I'm really grateful to have this going forward.

             

            Robert