Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: make viewstack child not invisible  (Read 8708 times)
purevwx
Newbie
*
Posts: 6


View Profile Email
« on: May 22, 2009, 07:28:13 »

hi all,

i know this is not a PureMVC centric question, but as most guys here seem to use flex i ask it anyways.
I have this viewstack:

:
<mx:ViewStack id="vwStack" left="0" top="0" right="0" bottom="0" resizeToContent="true" creationPolicy="auto">
<view:ImageViewer id="imageViewer"/>
<view:Player id="player"/>
<view:AssetPreview id="preview" bottom="80" width="100%"/>
</mx:ViewStack>
I want the child "preview" (a small one) to be visible in front of current active child f.e. on a mouseOver. At the moment it only shows one child at a time and the others are not visible. How can i do that?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: May 22, 2009, 01:47:28 »

The viewstack will ALWAYS show only one child. Something along these lines is what you'll probably want:

               
:
<mx:ViewStack id="vwStack" onMouseOver="showPreview=true" onMouseOut="showPreview=false">
<view:ImageViewer id="imageViewer"/>
<view:Player id="player" />
</mx:ViewStack>
<view:AssetPreview id="preview" bottom="80" width="100%" visible="{showPreview}"/>

-=Cliff>
Logged
purevwx
Newbie
*
Posts: 6


View Profile Email
« Reply #2 on: May 22, 2009, 03:52:26 »

thanks cliff, but this will show the AssetPreview-Component below the active viewstack component, won't it? I want to show the preview in front of the active viewstack component. I figured out that maybe i can manage that with PopUpManager, but i'm not sure if this works nice with mouseOver/mouseOut.

regards, Thomas
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: May 22, 2009, 04:13:45 »

The order posted above should be displayed overtop the viewstack if they're both children of a canvas. Successive MXML declarations are rendered above each other.

And yes, you could do it as a popup if you wanted to, but that'd be more effort.
-=Cliff>
Logged
purevwx
Newbie
*
Posts: 6


View Profile Email
« Reply #4 on: May 22, 2009, 04:54:05 »

hi again,

this doesn't work. i have the following code and the AssetPreview component is shown below the active view stack componenent  :-\

:
<mx:Canvas>
<mx:VBox x="0" y="0" height="520" width="600">

<mx:Button id="videomode" label="video"/>
<mx:Button id="imagemode" label="image"/>
<mx:ViewStack id="vwStack" left="0" top="0" right="0" bottom="0" resizeToContent="true" creationPolicy="auto">
<view:ImageViewer id="imageViewer"/>
<view:Player id="player"/>
</mx:ViewStack>
<view:AssetPreview id="preview" y="150" width="100%" visible="true"/>
</mx:VBox>
</mx:Canvas>

Am i missing something?

p.s. the viewstack also doesnt have mouseOver/mousOut event handler, but this is not my big problem.

regards, Thomas
« Last Edit: May 22, 2009, 04:56:01 by purevwx » Logged
purevwx
Newbie
*
Posts: 6


View Profile Email
« Reply #5 on: May 23, 2009, 05:38:32 »

ok, got it. Its because the Assetpreview component is in the vbox. Outside of this, it works!
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #6 on: May 23, 2009, 07:25:25 »

Your container holding the viewstack and the preview is a VBox. That control lays its children out vertically.

-=Cliff>
Logged
Pages: [1]
Print