1 Reply Latest reply on Jan 3, 2007 11:21 AM by Newsgroup_User

    Rollover effect with disapperaring pics

      Hi everybody

      basically i have created a project and i have lots of images with rollover effects so if you roll over a sprite on the stage another image from the library will appear in its place. When you leave the image with the mouse it should revert back to the first image. My problem is that some of the images i have will disappear after the mouse has been moved off the image and then do not reappear. It works with some pictures and others dont and i cant figure out why. This is the code ive used (just an example) of one that works:

      on mouseEnter me
      --rollover effect
      sprite ("Twisty laaiqa").member=member("Omar n laaiqa wrkin")

      on mouseLeave me
      --take off rollover effect
      sprite ("Twisty laaiqa").member=member("Twisty laaiqa")

      and this is one that doesnt work properly:

      on mouseEnter me
      --rollover effect
      sprite ("Tina gigglin").member=member("Omar n laaiqa wrkin hard")

      on mouseLeave me
      --take off rollover effect
      sprite ("Tina gigglin").member=member("Tina giggling")

      as you can see the coding is relatively the same just the images have different names...im very confused please help

      thank you
        • 1. Re: Rollover effect with disapperaring pics
          Level 7
          Have you really named your sprites? Or, are you confusing the sprite
          with the member that it represents? When you place an instance of a cast
          member on the stage, or into the score, you create a sprite. That sprite
          will be referenced by the channel number that it occupies. To name a
          sprite, you have to select it and then give it a name in the property
          inspector, or through a behavior that you attach to the sprite.

          Cast members can be named. If you import a bitmap image in to Director,
          the cast member will, usually, be named the same as the file that was
          imported, without the file extension. You can give a cast member a new
          name by selecting it and typing a new name, or through Lingo.

          If you are, indeed, naming your sprites, then you might want to consider
          using unique names, not the same name as the member that it represents.

          I have never seen a valid argument for naming sprites. I consider it a
          huge waste of time and resources. Its also just plain silly.

          Rob Dillon
          Adobe Community Expert