4 Replies Latest reply on Jul 12, 2006 10:06 AM by oreopeewee

    disjointed rollover

    oreopeewee
      I will try and explain...I have 10 thumbnail pictures. I would like to display the thumbnails and when you mouseover them the larger image will appear. Here is the code I used...

      on mouseEnter
      sprite(34).visible = TRUE
      end

      on mouseLeave
      sprite(34).visible = FALSE
      end


      Each image is in a different channel and nothing else is in that channel. When I play the movie the thumbnails will not work unless I click on the last one first and then they will work. Any thoughts on what I could do?

      thanks
        • 1. Re: disjointed rollover
          Level 7
          Is all of this happening in one frame? In other words, are you holding
          on a frame and then displaying the 10 thumbnail images? When you mouse
          over any one thumbnail, you want a larger version of that image to show
          on the stage, yes?

          One way to do this is to assign a new member of sprite value to a single
          sprite on the stage for each mouse enter event. You can either assign
          the member in a behavior that you attach to each thumbnail sprite, or
          you can use a naming convention that will relate the large images to the
          small images.

          Another method is to place the large images each in one frame across ten
          frames, stretch your thumbnail images across these same ten frames,
          place a go to the frame frame behavior in each frame, then move to the
          frame that contains the larger image on the mouse enter event. On the
          mouse leave event, go to a frame with no large image, just the
          thumbnails.

          If you want to stay in one frame, then you can use a single pixel sprite
          for your large image target sprite. Set the registration point for each
          of the large image members to their center.

          Then you can apply a behavior like this to each of the thumbnails:

          ---------
          property largeImageMember
          property displaySprite
          property defaultMember
          property thisSprite

          on getPropertyDescriptionList
          myPropList = [:]
          myPropList.addProp(#largeImageMember,[#comment:"pick the large image
          version of this sprite:",#format:#bitmap,#default:""])
          myPropList.addProp(#displaySprite,[#comment:"enter the sprite channel
          to use to display the large image:",#format:#integer,#default:""])
          return myPropList
          end

          on beginSprite me
          thisSprite = me.spriteNum
          defaultMember = sprite(displaySprite).member.name
          end

          on mouseEnter me
          sprite(displaySprite).member = largeImageMember
          end

          on mouseLeave me
          sprite(displaySprite).member = defaultMember
          end
          ----------

          --
          Rob
          _______
          Rob Dillon
          Adobe Community Expert
          http://www.ddg-designs.com
          412-243-9119

          http://www.macromedia.com/software/trial/
          • 2. Re: disjointed rollover
            oreopeewee Level 1
            Thanks so much for answering me. The answer you gave (below) was the only one I could understand but it won't work because my menu bar is in all frames and if I use the choice below and mouse over my menu bar the pictures change. I am trying to make sense (in my mind) of the first answer you gave me. Any other thoughts?

            Another method is to place the large images each in one frame across ten
            frames, stretch your thumbnail images across these same ten frames,
            place a go to the frame frame behavior in each frame, then move to the
            frame that contains the larger image on the mouse enter event. On the
            mouse leave event, go to a frame with no large image, just the
            thumbnails.
            • 3. Re: disjointed rollover
              Level 7
              Here's a very simple example:
              http://www.ddg-designs.com/downloads/thumbnail.zip

              This should explain the process for you.

              --
              Rob
              _______
              Rob Dillon
              Adobe Community Expert
              http://www.ddg-designs.com
              412-243-9119

              http://www.macromedia.com/software/trial/
              • 4. Re: disjointed rollover
                oreopeewee Level 1
                Thanks so much!!!!!