imagez-indexapache-royale

How to set "z-index" of an element in Apache Royale (equivalent of setElementIndex in Flex)?


I want to make a simple pictures slideshow with Apache Royale. To simplify I have 2 <j:Image> in a <j:Group>. Something like this (but written dynamicaly in as3)

<j:Group>
    <j:Image src="1.jpg" id="im1"/>
    <j:Image src="2.jpg" id="im2"/>
</j:Group>

This would result of 2.jpg visible because im2 is after im1. Now I want to set position of im2 before im1. This would be the equivalent of setElementIndex of Flex. (I don't want to play with visible)

Is it possible ? How to do ?

Regards


Solution

  • setElementIndex is not currently implemented in Royale. What we did in our app with a similar use case was to remove the element you want to move to the front and re-add it.