<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Creating custom pop-up windows with the PopUpManager class</title>
	<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Thu, 20 Nov 2008 00:16:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Prashanth Samanth</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-13185</link>
		<author>Prashanth Samanth</author>
		<pubDate>Mon, 02 Jun 2008 12:35:37 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-13185</guid>
		<description>Hello Guys,

Can I get a Simple AS or JS to open a Popup, so that I can reuse those AS or JS in various places just by calling the JS and the path of the file to open as Popup



Thank a lot in Advance
Prashanth Samanth</description>
		<content:encoded><![CDATA[<p>Hello Guys,</p>
<p>Can I get a Simple AS or JS to open a Popup, so that I can reuse those AS or JS in various places just by calling the JS and the path of the file to open as Popup</p>
<p>Thank a lot in Advance<br />
Prashanth Samanth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arun</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-13038</link>
		<author>Arun</author>
		<pubDate>Wed, 28 May 2008 06:10:03 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-13038</guid>
		<description>help me i want  codes for setting one Application having controls  in view folder as components.</description>
		<content:encoded><![CDATA[<p>help me i want  codes for setting one Application having controls  in view folder as components.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7733</link>
		<author>peterd</author>
		<pubDate>Fri, 21 Mar 2008 01:37:10 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7733</guid>
		<description>Actually, I'll just do a new post, it would be easier to read:
&lt;a href="http://blog.flexexamples.com/2008/03/20/creating-custom-pop-up-windows-with-the-popupmanager-class-redux/" rel="nofollow"&gt;&lt;u&gt;"Creating custom pop-up windows with the PopUpManager class (redux)"&lt;/u&gt;&lt;/a&gt;

Peter</description>
		<content:encoded><![CDATA[<p>Actually, I&#8217;ll just do a new post, it would be easier to read:<br />
<a href="http://blog.flexexamples.com/2008/03/20/creating-custom-pop-up-windows-with-the-popupmanager-class-redux/" rel="nofollow"><u>&#8220;Creating custom pop-up windows with the PopUpManager class (redux)&#8221;</u></a></p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7732</link>
		<author>peterd</author>
		<pubDate>Fri, 21 Mar 2008 01:14:48 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7732</guid>
		<description>Nick,

Instead of creating a TextInput control in the previous example, you could create a read-only TextArea (set the &lt;code&gt;editable&lt;/code&gt; property to &lt;code&gt;false&lt;/code&gt;).

Or, if you want a longer answer, something like this should do the trick (and probably be a bit more reusable:

&lt;pre class="code"&gt;
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;!-- main.mxml --&#62;
&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&#62;

    &#60;mx:Script&#62;
        &#60;![CDATA[
            import mx.managers.PopUpManager;

            private function launchMoreInfo():void {
                var win:Dialog = PopUpManager.createPopUp(this, Dialog, true) as Dialog;
                PopUpManager.centerPopUp(win);
            }
        ]]&#62;
    &#60;/mx:Script&#62;

    &#60;mx:ApplicationControlBar dock="true"&#62;
        &#60;mx:Button id="button"
                label="Click for more information"
                click="launchMoreInfo();" /&#62;
    &#60;/mx:ApplicationControlBar&#62;

&#60;/mx:Application&#62;
&lt;/pre&gt;

&lt;pre class="code"&gt;
&#60;?xml version="1.0" encoding="utf-8"?&#62;
&#60;!-- Dialog.mxml --&#62;
&#60;mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        title="More information"
        showCloseButton="true"
        width="400"
        height="300"
        close="titleWindow_close(event);"&#62;

    &#60;mx:Script&#62;
        &#60;![CDATA[
            import mx.events.CloseEvent;
            import mx.managers.PopUpManager;

            private function titleWindow_close(evt:CloseEvent):void {
                PopUpManager.removePopUp(this);
            }
        ]]&#62;
    &#60;/mx:Script&#62;

    &#60;mx:String id="info" source="info.txt" /&#62;

    &#60;mx:TextArea id="txt"
            htmlText="{info}"
            focusAlpha="0.0"
            width="100%"
            height="100%" /&#62; 

&#60;/mx:TitleWindow&#62;
&lt;/pre&gt;

Then create a text file named "info.txt" in the same directory as main.mxml and Dialog.mxml and enter whatever text you want to appear in the More Information dialog.

Hope that helps,
Peter</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>Instead of creating a TextInput control in the previous example, you could create a read-only TextArea (set the <code>editable</code> property to <code>false</code>).</p>
<p>Or, if you want a longer answer, something like this should do the trick (and probably be a bit more reusable:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- main.mxml --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.managers.PopUpManager;

            private function launchMoreInfo():void {
                var win:Dialog = PopUpManager.createPopUp(this, Dialog, true) as Dialog;
                PopUpManager.centerPopUp(win);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button id="button"
                label="Click for more information"
                click="launchMoreInfo();" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

&lt;/mx:Application&gt;
</pre>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- Dialog.mxml --&gt;
&lt;mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        title="More information"
        showCloseButton="true"
        width="400"
        height="300"
        close="titleWindow_close(event);"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.CloseEvent;
            import mx.managers.PopUpManager;

            private function titleWindow_close(evt:CloseEvent):void {
                PopUpManager.removePopUp(this);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:String id="info" source="info.txt" /&gt;

    &lt;mx:TextArea id="txt"
            htmlText="{info}"
            focusAlpha="0.0"
            width="100%"
            height="100%" /&gt; 

&lt;/mx:TitleWindow&gt;
</pre>
<p>Then create a text file named &#8220;info.txt&#8221; in the same directory as main.mxml and Dialog.mxml and enter whatever text you want to appear in the More Information dialog.</p>
<p>Hope that helps,<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7731</link>
		<author>Nick</author>
		<pubDate>Fri, 21 Mar 2008 00:36:29 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7731</guid>
		<description>Hi Peter,

I am looking for a script like this, where the user can say click on a text or button that says "Click here for more info" I do not want them to enter info on a text box, but I want to create a custom text popup in a box that explains info to them, not for them to enter info. Can you modify this script to do so, or what do you suggest?

Thanks alot!

Nick</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I am looking for a script like this, where the user can say click on a text or button that says &#8220;Click here for more info&#8221; I do not want them to enter info on a text box, but I want to create a custom text popup in a box that explains info to them, not for them to enter info. Can you modify this script to do so, or what do you suggest?</p>
<p>Thanks alot!</p>
<p>Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stranger</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7524</link>
		<author>Stranger</author>
		<pubDate>Thu, 13 Mar 2008 09:45:18 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-7524</guid>
		<description>Hi, 

How can i the background even when i open the popup window. The background gets disabled when i open a popup window. I want to enable the background also. 

Can you help me in this.

Regards
Stranger</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>How can i the background even when i open the popup window. The background gets disabled when i open a popup window. I want to enable the background also. </p>
<p>Can you help me in this.</p>
<p>Regards<br />
Stranger</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-5809</link>
		<author>Jason</author>
		<pubDate>Fri, 04 Jan 2008 21:41:06 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-5809</guid>
		<description>Is there anyway I can create the panel using the flex builder gui rather than actionscript code?</description>
		<content:encoded><![CDATA[<p>Is there anyway I can create the panel using the flex builder gui rather than actionscript code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: seb</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-3924</link>
		<author>seb</author>
		<pubDate>Tue, 06 Nov 2007 14:04:26 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-3924</guid>
		<description>Tariq Jamal &#62; yes if you make that :
&lt;pre class="code"&gt;
....
private var panel:Panel;
private var textInput:TextInput;
....
&lt;/pre&gt;

And you replace on :
&lt;pre class="code"&gt;
private function init():void {
... 
var textInput:TextInput = new TextInput(); // before 
textInput = new TextInput(); // replace by
...
}
&lt;/pre&gt;

And after you can access to the text property of element textInput, for exemple
&lt;pre class="code"&gt;
private function closePopUp(evt:MouseEvent):void {
         Alert.show(textInput.text)
         PopUpManager.removePopUp(panel);
}
&lt;/pre&gt;

Regards, Seb</description>
		<content:encoded><![CDATA[<p>Tariq Jamal &gt; yes if you make that :</p>
<pre class="code">
....
private var panel:Panel;
private var textInput:TextInput;
....
</pre>
<p>And you replace on :</p>
<pre class="code">
private function init():void {
...
var textInput:TextInput = new TextInput(); // before
textInput = new TextInput(); // replace by
...
}
</pre>
<p>And after you can access to the text property of element textInput, for exemple</p>
<pre class="code">
private function closePopUp(evt:MouseEvent):void {
         Alert.show(textInput.text)
         PopUpManager.removePopUp(panel);
}
</pre>
<p>Regards, Seb</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tariq Jamal</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-3905</link>
		<author>Tariq Jamal</author>
		<pubDate>Mon, 05 Nov 2007 20:59:27 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-3905</guid>
		<description>Is there anyway to have the variables they enter transfer to the main state? OR refer to the variables?</description>
		<content:encoded><![CDATA[<p>Is there anyway to have the variables they enter transfer to the main state? OR refer to the variables?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-113</link>
		<author>Nick</author>
		<pubDate>Thu, 09 Aug 2007 14:14:59 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/06/creating-custom-pop-up-windows-with-the-popupmanager-class/#comment-113</guid>
		<description>Itried to use this code for displaying a popUp window after the user has selected a row on a dataGrid in flex2.  I used binding to show the contacts details in the popUp inside a labels textField. it works the way you have done it perfectly off a button but why wont it work form a selected Item click off a dataGrid. Here is my long long code. 


		
	
	
	
	
		
			
				
			
			
				
			
			
				
				
				
			
			
		
		
	
	
	
		Please type your name, location or number as you see it appear on the contacts list including all spaces as you see them. Do not use the ' ' or '(' ')' operators as this will result in a miss match.
	
	    
	    
    
        
        
         
	    	 
	    	 
	
	
		
		
	
    
        
        
         
	
	
	
	
		
		
            
		
            
		
            
		
            
		
            
		
            

I know you wont get the data in the grid but that part works fine.</description>
		<content:encoded><![CDATA[<p>Itried to use this code for displaying a popUp window after the user has selected a row on a dataGrid in flex2.  I used binding to show the contacts details in the popUp inside a labels textField. it works the way you have done it perfectly off a button but why wont it work form a selected Item click off a dataGrid. Here is my long long code. </p>
<p>		Please type your name, location or number as you see it appear on the contacts list including all spaces as you see them. Do not use the &#8216; &#8216; or &#8216;(&#8217; &#8216;)&#8217; operators as this will result in a miss match.</p>
<p>I know you wont get the data in the grid but that part works fine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
