2 Replies Latest reply on Feb 3, 2009 12:54 PM by Newsgroup_User

    Visible Property Not Working

    katie_lostsoul
      Hello,

      I have a button, that when rolled over, will show another sprite.

      Code on the button:

      on beginSprite
      sprite("print01").visible=FALSE
      end

      on MouseEnter me
      _player.cursor(280)
      sprite(me.spriteNum).member=member("01_btn_o")
      sprite("print01").visible=TRUE
      end

      on MouseLeave me
      _player.cursor(0)
      sprite(me.spriteNum).member=member("01_btn_n")
      sprite("print01").visible=FALSE
      end


      And the "print01" sprite has been named and is on the timeline.

      I keep getting an error message saying the property isn't found #visible

      Any help would be great - thanks
        • 1. Re: Visible Property Not Working
          katie_lostsoul Level 1
          I got it working - instead of naming the sprites I just referenced the sprite number, and now it works.
          • 2. Re: Visible Property Not Working
            Level 7
            > I keep getting an error message saying the property isn't found #visible

            My guess is you misspelled the sprite name, either in the script or on the
            sprite itself. That's the error you get when trying to access a
            non-existent sprite. (Yeah, I know, not a very helpful error message there.
            I wish it would just say "no such sprite" instead - I've been hit with that
            one more times than I care to count.)

            I know you solved it by using the sprite's number instead of its name, but
            since the addition of the sprite-naming feature, I've tried to get out of
            using sprite-numbers, because if you ever need to move your sprites around
            on the score (say, to put something underneath them), you then have to edit
            all your code that refers to numbers to make them match again, which can be
            a real hassle on larger projects.