Skip navigation
kevc0722
Currently Being Moderated

Keeping a watermark(button) on top after Images have dynamically loaded

Apr 21, 2013 11:25 PM

I have a set up that looks something like:

 

<mx:Canvas>

     <mx:Image id="mayimage"/>

</mx:Canvas>

<mx:Button id="watermark"/>

 

Where the button is the watermark that I want to keep on top of the image.

But after loading the actual image dynamically using addChild, the skin of the button(which is embeded using @Embed) is covered up by the new image.

The weird thing is, it looks fine in Firefox, where the watermark button is still on the very top layer, it only gets covered up in Chrome.  Also, the button is still clickable even though it's covered by the image, meaning only the skin of the button is covered...

Anyway of keeping the skin of the button on the very top layer?

 
Replies
  • Currently Being Moderated
    Apr 27, 2013 6:27 PM   in reply to kevc0722

    you can force one child of a MovieClip/Sprite behind another by using sth like:

     

    var index:int = button.getChildIndex(watermark);

    button.addChildAt(image, index-1);

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points