I am afraid I must restart this topic because everything I have read in previous threads does not help me to understand why I cannot get this to work.
I have created a window called Main. Inside, there are two layouts (Layout1 and Layout2). I have placed a button in Layout1 that switches to Layout2 when clicked:
--> CODE:
<Button up="Layout2_Open" action="Main.setLayout(Layout2)" id="Button_Layout2" x="258" y="79"/>
I have placed an animated bitmap in Layout2 which I want to play when the layout is active, but it does not play. I understand that switching the layout of a window (for example, Layout1 to Layout2) is supposed to start the animation (but changing from one window to another does not). My code looks like this:
-->CODE
<Bitmap id="Layout2_Open_Sequence" file="Resources/Background_Layout2.png" alphacolor=#FF00FF>
<SubBitmap id="Layout2_Animation_Open" x="1" y="1" height="1580" width="536" nbframes="10" fps="10" loop="1"/>
</Bitmap>
<Window id="Main" visible="true">
<Layout id="Layout1" width="538" height="387">
<Button up="Set_Layout_2" action="Main.setLayout(Layout2)" id="Go_To_Layout2" x="258" y="79"/>
</Layout>
<Layout id="Layout2" width="538" height="387">
<Image id="OpenPanel" image="Layout2_Animation_Open" visible="true" action="none"/>
<Button up="Set_Layout_1" action="Main.setLayout(Layout1)" id="Go_To_Layout1" x="258" y="79"/>
</Layout>
</Window>
I use a button to change the active layout back to Layout1 so that the bitmap "resets" so it can be replayed the next time I want to go to Layout2 (Layout2 is to be for VLC settings and such, and it's purpose is to only be active when I need to change something, thus leaving the main layout ...Layout1... clean and without the clutter of buttons).
My question is why does the animation not work? Am I missing something in the code? As I said, everything I have read in the forums makes me believe that this should work. Please help!
Thank you,
Grumps