|
|
Show Posts
|
Pages: [1]
|
1
|
Announcements and General Discussion / General Discussion / make viewstack child not invisible
|
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?
|
|
|
2
|
Announcements and General Discussion / General Discussion / dispatch MouseEvent from view component
|
on: May 18, 2009, 01:46:38
|
hi all,
i listen for a mouseclick event in a mediator. I used an approach i found in the EmployeeAdmin example to dispatch an event from the view component. Images are rendered fine and the component is clickable but flashplayer complains that flash.events::Event@23f47041 cannot be converted to flash.events.MouseEvent. I also tried to dispatch an MouseEvent, but it doesn't work. Here's my component code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="80" direction="horizontal"> <mx:Metadata> [Event('click')] </mx:Metadata>
<mx:Script> <![CDATA[ public static const CLICK:String = 'click'; // send the named event private function sendEvent( eventName:String ):void { dispatchEvent( new Event( eventName, true ) ); } ]]> </mx:Script> <mx:Repeater id="rp"> <mx:Image source="{rp.currentItem}" buttonMode="true" width="60" height="60" click="sendEvent( CLICK )"/> </mx:Repeater> </mx:Box>
I'm really stuck at the moment and i don't know if theres a "best practice" to manage this. Anybody can help me out?
regards!
|
|
|
|
|