1 Reply Latest reply on Dec 7, 2007 4:23 AM by atta707

    adding tooltip to image

    ljonny18 Level 1
      Hi I am imbedding an image within a component the following way:


      [Embed(source='../images/myImage.png')]
      public var myImageClass:Class;

      public var myImageImg:Bitmap;


      myImageImg = new myImageClass ();
      myImageImg.x = 10;
      myImageImg.y = 10;

      addChild(myImageImg);


      Which seems to work fine!!! Now I simply add a tool tip to this image and I am not sure how to go about it from this angle.


      Could someone please help and point me in the right direction???

      Thanks,
      Jon.
        • 1. adding tooltip to image
          atta707 Level 2
          Have you tried toolTip property like x and y properties?

          myImageImg = new myImageClass ();
          myImageImg.x = 10;
          myImageImg.y = 10;

          --> myImageImg.toolTip = "Tooltip text";

          addChild(myImageImg);

          if this doesn't work, then

          myImageImg = new myImageClass ();

          myImageImg.x = 10;
          myImageImg.y = 10;

          var img:Image = new Image()
          img.addChild(myImageImg);
          img.toolTip = "test"l

          addChild(img);