Jay Roy
asked on
show-hide on MOUSE OVER
hi guys
I have a button.when i put the mouse cursor on it , it should show the pop up , when the cursor is moved away from the button the popup should dissapear
my code:
<mx:Button id="teamMembersList" label="show" mouseOver="PopUp(event,pro jDetails.m embersList );" />
private function PopUp(e:MouseEvent,list:Ar rayCollect ion):void {
var popupwindow : IdWindowComponent = new IdWindowComponent();
var pt:Point = new Point(e.localX, e.localY);
pt = e.target.localToGlobal(pt) ;
popupwindow.x = pt.x ;
popupwindow.y = pt.y;
popupwindow.list = list;
popupwindow.listType = listType;
PopUpManager.addPopUp(popu pwindow,th is,false);
}
Right now the mouse over works, i see the pop up when i mouse over, but the popup comes with a X to close.
I want the pop up to dissapear when the mouse cursor is moved away from the button.
any clues how i can tweak the above code?
thanks
I have a button.when i put the mouse cursor on it , it should show the pop up , when the cursor is moved away from the button the popup should dissapear
my code:
<mx:Button id="teamMembersList" label="show" mouseOver="PopUp(event,pro
private function PopUp(e:MouseEvent,list:Ar
var popupwindow : IdWindowComponent = new IdWindowComponent();
var pt:Point = new Point(e.localX, e.localY);
pt = e.target.localToGlobal(pt)
popupwindow.x = pt.x ;
popupwindow.y = pt.y;
popupwindow.list = list;
popupwindow.listType = listType;
PopUpManager.addPopUp(popu
}
Right now the mouse over works, i see the pop up when i mouse over, but the popup comes with a X to close.
I want the pop up to dissapear when the mouse cursor is moved away from the button.
any clues how i can tweak the above code?
thanks
ASKER
>>mouseOut
aahh.. thats the key, i dint know that.
i am new to flex dgofman, so plz bear with me if my questions are simple (and stupid) :-)
thanks.
aahh.. thats the key, i dint know that.
i am new to flex dgofman, so plz bear with me if my questions are simple (and stupid) :-)
thanks.
I am glad you are happy this my answers :)
Please can close this ticket from my list.
Please can close this ticket from my list.
ASKER
My code is slightly different, let me explain
popup:
private function launchPopUp(e:MouseEvent,l ist:ArrayC ollection, show:Boole an):void {
if(show == true){
var popupwindow : IdWindowComponent = new IdWindowComponent();
var pt:Point = new Point(e.localX, e.localY);
pt = e.target.localToGlobal(pt) ;
popupwindow.x = pt.x ;
popupwindow.y = pt.y;
popupwindow.list = list; --setting list in IdWindowComponent shown below
PopUpManager.addPopUp(popu pwindow,th is,false);
}
else{ //if false
PopUpManager.removePopUp(p opupwindow ); //this should also work i guess?
}
}
<mx:Button label="show" mouseOver="launchPopUp(eve nt,projDet ails.teamM embersList ,true);"
mouseOut="launchPopUp(even t,projDeta ils.teamMe mbersList, false);" />
and this is my IdWindowComponent
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" width="186" height="262" horizontalAlign="center"
verticalAlign="top"
barColor="#000066"
borderColor="#000066">
<mx:Script>
<![CDATA[
public var list:ArrayCollection;
]]>
</mx:Script>
<mx:DataGrid id="dataGrid" dataProvider="{list}" width="146" height="201">
<mx:columns>
<mx:DataGridColumn dataField="id"/> --display list in a grid
</mx:columns>
</mx:DataGrid>
</mx:TitleWindow>
the Mouseover and mouseout dont seem to work in this scenario, any idea where i am going wrong?
thanks.
popup:
private function launchPopUp(e:MouseEvent,l
if(show == true){
var popupwindow : IdWindowComponent = new IdWindowComponent();
var pt:Point = new Point(e.localX, e.localY);
pt = e.target.localToGlobal(pt)
popupwindow.x = pt.x ;
popupwindow.y = pt.y;
popupwindow.list = list; --setting list in IdWindowComponent shown below
PopUpManager.addPopUp(popu
}
else{ //if false
PopUpManager.removePopUp(p
}
}
<mx:Button label="show" mouseOver="launchPopUp(eve
mouseOut="launchPopUp(even
and this is my IdWindowComponent
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" width="186" height="262" horizontalAlign="center"
verticalAlign="top"
barColor="#000066"
borderColor="#000066">
<mx:Script>
<![CDATA[
public var list:ArrayCollection;
]]>
</mx:Script>
<mx:DataGrid id="dataGrid" dataProvider="{list}" width="146" height="201">
<mx:columns>
<mx:DataGridColumn dataField="id"/> --display list in a grid
</mx:columns>
</mx:DataGrid>
</mx:TitleWindow>
the Mouseover and mouseout dont seem to work in this scenario, any idea where i am going wrong?
thanks.
Are you using SDK 3 in your Eclipse (only), because you code for halo theme.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
thanks v much.
any help with my next question is greatly appreciated.
https://www.experts-exchange.com/questions/26921802/send-email-on-button-click.html
thx.
any help with my next question is greatly appreciated.
https://www.experts-exchange.com/questions/26921802/send-email-on-button-click.html
thx.
Open in new window
<mx:Button id="teamMembersList" label="show" mouseOver="show(event, true)" mouseOut="show(event, false)"/>