I have no idea, what is wrong with your app, I have the same thing and it is 
working .... Share the window and I'll try to have a look these days
C




________________________________
From: xmwang1982 <[email protected]>
To: [email protected]
Sent: Sat, March 6, 2010 3:58:58 AM
Subject: [flexcoders] Re: Can't move titlewindow in an Application

   
if I set isPopUp to true and remove all the listners, I can't even drag and 
move the window.

with the old code, I can drag and move the window but can't drop it to the last 
position in dragging.

what's wrong with that? thanks.

--- In flexcod...@yahoogro ups.com, claudiu ursica <the_braniak@ ...> wrote:
>
> in creation complete add this.isPopUp = true;
> Make sure u get rid of all the listeners ...
> C
> 
> 
> 
> 
> ____________ _________ _________ __
> From: xmwang1982 <ask...@...>
> To: flexcod...@yahoogro ups.com
> Sent: Fri, March 5, 2010 4:30:30 PM
> Subject: [flexcoders] Can't move titlewindow in an Application
> 
> 
> Hi experts,
> 
> I have a class inheriting TitleWindow, and I add the following code to enable 
> drag/drop of the title window by press on the title bar:
> 
> private function onCreationComplete( evt:Event) :void
> {
> this.titleBar. addEventListener (MouseEvent. MOUSE_DOWN, startDragWin) ;
> this.titleBar. addEventListener (MouseEvent. MOUSE_UP, stopDragWin) ;
> this.titleBar. addEventListener (MouseEvent. MOUSE_OUT, stopDragWin) ; 
> this.addEventListen er(DragEvent. DRAG_DROP, moveSelf);
> }
> 
> private function moveSelf(evt: DragEvent) :void
> {
> this.x = evt.stageX;
> this.y = evt.stageY; 
> }
> 
> private function startDragWin( evt:MouseEvent) :void
> {
> 
> 
> this.startDrag( );
> }
> 
> 
> 
> private function stopDragWin( evt:MouseEvent) :void
> {
> 
> this.stopDrag( );
> }
> 
> I added the object as the top level child of an application. However the 
> settings of x and y are not working. The window is not moved.
> 
> I have been confused for long. Any possible reason?
> 
> Layout of application is: layout="absolute"
> 
> The following attributes were set for the title window in the MXML of the 
> application 
> 
> <MyTitleWindow backgroundAlpha= "0.5" bottom="10" right="10" width="400" 
> height="300" ...>
> 
> I guess these initial settings don't matter at all.
> 
> Please suggest. Thanks in advance.
>


 


      

Reply via email to