header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
krishna
Points:260
Posts:0

5/24/2010 12:42:56 AM

Title: popup window position


Hi All,

I have a popup window, by default i given a center pop up in my appliation, but i want top right of the application. How to give? please help me..

Thanks in advance,
K.V.Ramakrishna



1
Derek
Points: 0
Posts:0
5/24/2010 1:54:02 AM



Using flex with Actionscript 3.0
To position you popup window you can add it to some container and place that container at any position.



//here myTitleWindow is my TitleWindow that I am adding as popup and popContainer is my Vbox which is placed at x=0. So my popup window is also placed at x.

 mx.managers.PopUpManager.addPopUp(myTitleWindow, popContainer, true);
If you didn't understand , let me know I will send you the sample

2
Lester
Points: 0
Posts:0
5/24/2010 2:47:17 AM



you can position the popUpWIndow to center using PopUpManager.createPopUp(yourPopUp);

3
krishna
Points: 260
Posts:0
5/24/2010 4:02:28 AM



Hi,
Please send the sample

4
Derek
Points: 0
Posts:0
5/24/2010 5:36:37 AM



check this sample to position popup anywhere in application using flex



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="700" height="400">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
private function createPopup():void{
var tw:TitleWindow = new TitleWindow();
tw.title = "My Title";
mx.managers.PopUpManager.addPopUp(pnl, popContainer, true);
}
private function removePopup():void{
PopUpManager.removePopUp(pnl);
}
]]>
</mx:Script>
<mx:Button x="32" y="37" label="Create Popup" click="createPopup()"/>
<mx:Button x="143" y="37" label="Remove Popup" click="removePopup()"/>
<mx:VBox x="0" y="50" id="popContainer">
</mx:VBox>
<mx:TitleWindow x="143" y="98" id="pnl" backgroundColor="#FF5B5B" dropShadowEnabled="true" shadowDirection="right" shadowDistance="10" backgroundAlpha="1" borderStyle="solid">
<mx:FormItem label=" My pop Up Content">
<mx:Button label="Button"/>
</mx:FormItem>
</mx:TitleWindow>
</mx:Application>


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+2 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions