3 Replies Latest reply on Jul 14, 2006 5:38 AM by Peter Lorent

    Class problem

    Tolk Level 1
      I wrote this simple class which i hope to develop into a tool tip class when i get it working.
      I'm not sure why this isnt working could someone help.

        • 1. Re: Class problem
          mc and clip shouldn't be movieClip type, becouse this is not a movieclip - it is reference to movie clip.

          • 2. Re: Class problem
            Tolk Level 1
            I replaced as you said but it still doesnt work, acts just the same.

            I'm not sure what it's doing exactly but it's as if it just runs through everything once and then stops and doesnt detect the onRoll events.

            So the movieClip test submitted get given an alpha of 20% and thats it.
            • 3. Re: Class problem
              Peter Lorent Level 2
              panell: read up on classes.

              Tolk: you are using composition -> public var mc:MovieClip;
              So there is no need to extend the MovieClip. Only extend the movieclip class when you need all or most of the movieclip functionality. Your code has a scope problem:
              mc.onRollOver=Over(); // btw, should be mc.onRollOver=Over;
              The function Over() is now in the scope of mc and you want it to be in the scope of the current object (the instance of ToolTip). Use the attached code.