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

Show Posts

* | |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / General Discussion / Re: make viewstack child not invisible on: May 23, 2009, 05:38:32
ok, got it. Its because the Assetpreview component is in the vbox. Outside of this, it works!
2  Announcements and General Discussion / General Discussion / Re: make viewstack child not invisible 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
3  Announcements and General Discussion / General Discussion / Re: make viewstack child not invisible 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
4  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?
5  Announcements and General Discussion / General Discussion / Re: dispatch MouseEvent from view component on: May 19, 2009, 04:20:53
first of all, thanks for your response! It works now. I use the approach with the MouseEvent-Listener, because i hope that would enough for me. I used the custom event when i started this thread, because it was the only sample code if found for dispatching events from a view component (employeeAdmin demo). Now i ended up with that in the Mediator

:
override public function onRegister():void
{
assetPreview.addEventListener( MouseEvent.CLICK, onClick);
}


As you said, it listens for the event, no matter if i redispatch the MouseEvent or not. Which seems normal, because the listener is added to the whole view component. Is there a way to add the listener for each image only? Maybe i then get better results on the clicked target (the loader object)?

If thats not possible, i refer to Jason:
The example you took from is more if you want a way of identifying which item was clicked and to dispatch custom events based on that knowledge.

How would you do that with custom events?
6  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!
Pages: [1]