Re: [flexcoders] How to open the popup many time?

2008-12-18 Thread Fotis Chatzinikos
I think he means re-opening the window after a user closes it?

Is that the case Mark?

If so keep a reference to your window instance and call open on it via a
button as you already do,...

If you want multiple windows, change :

private var win:BasicWindow = new BasicWindow();

to:

private var winsAC:ArrayCollection = new ArrayCollection() ;

and then:

private function createWindow():void{
//Alert.show("I am here");

win = new BasicWindow() ;
win.showText = "Show me on the Window";
win.open();
winsAC.addItem(win)
}

Not tested, but looks logical 


On Thu, Dec 18, 2008 at 10:14 AM, Haykel BEN JEMIA wrote:

>   You can't show one instance many times. You will have to create as many
> instances as you need windows.
>
> private function createWindow(message:String):void
> {
>   var win:BasicWindow = new BasicWindow();
>   win.showText = message;
>   win.open();
> }
>
> You will have to manage all the instances created.
>
> Haykel Ben Jemia
>
> Allmas
> Web & RIA Development
> http://www.allmas-tn.com
>
>
>
>
> On Wed, Dec 17, 2008 at 10:50 PM, markflex2007 wrote:
>
>>   Hi,
>>
>> I have a component file.
>>
>> BasicWindow.mxml
>>
>> 
>> http://www.adobe.com/2006/mxml";
>> layout="absolute" width="300" height="200">
>> 
>> 
>> 
>> 
>> 
>>
>> This is the main file,but I only can open the window once,I want to
>> know how to open it many times.Please help me.Thanks
>>
>> main.mxml
>>
>> private var win:BasicWindow = new BasicWindow();
>>
>> private function createWindow():void{
>> //Alert.show("I am here");
>>
>> win.showText = "Show me on the Window";
>> win.open();
>> }
>>
>>
>> > horizontalCenter="0" y="50"/>
>>
>>
>  
>



-- 
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
fotis.chatzini...@gmail.com,


Re: [flexcoders] How to open the popup many time?

2008-12-18 Thread Haykel BEN JEMIA
You can't show one instance many times. You will have to create as many
instances as you need windows.

private function createWindow(message:String):void
{
  var win:BasicWindow = new BasicWindow();
  win.showText = message;
  win.open();
}

You will have to manage all the instances created.

Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com




On Wed, Dec 17, 2008 at 10:50 PM, markflex2007 wrote:

>   Hi,
>
> I have a component file.
>
> BasicWindow.mxml
>
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute" width="300" height="200">
> 
> 
> 
> 
> 
>
> This is the main file,but I only can open the window once,I want to
> know how to open it many times.Please help me.Thanks
>
> main.mxml
>
> private var win:BasicWindow = new BasicWindow();
>
> private function createWindow():void{
> //Alert.show("I am here");
>
> win.showText = "Show me on the Window";
> win.open();
> }
>
>
>  horizontalCenter="0" y="50"/>
>
>  
>


[flexcoders] How to open the popup many time?

2008-12-17 Thread markflex2007
Hi,

I have a component file.

BasicWindow.mxml
 
 
 http://www.adobe.com/2006/mxml";
layout="absolute" width="300" height="200">
 

 
 



This is the main file,but I only can open the window once,I want to
know how to open it many times.Please help me.Thanks

main.mxml

private var win:BasicWindow = new BasicWindow();

private function createWindow():void{
  //Alert.show("I am here");

  win.showText = "Show me on the Window";
  win.open();
 }