• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

New Here ,
Apr 21, 2013 Apr 21, 2013

Copy link to clipboard

Copied

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?

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Apr 27, 2013 Apr 27, 2013

Copy link to clipboard

Copied

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);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 28, 2013 Apr 28, 2013

Copy link to clipboard

Copied

LATEST

I've tried  index and depth, both don't work, but this turned out to be a pepper flash problem, as disabling pepper flash in chrome solves it.

So the only way around this is to actually not use alpha and file a bug report with chrome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines