Re: [flexcoders] loading mxml components based on flashvars

2007-06-05 Thread Brendan Meutzner

Try component1 != null && component1 != ""

Also, if you set component1 = '' when you're defining it, you'd only need to
test for != '' inside the openWin function...

Brendan

On 6/4/07, Rohan Pinto <[EMAIL PROTECTED]> wrote:


  Hi Folks,

I'm passing component ID's into my app using flashvars.

in my main Application, I procure the values as follows:
[Bindable]
public var component1:String;

[Bindable]
public var component2:String;
component1=this.parameters.component1;
component2=this.parameters.component2;

in the function as defined in my main Application :
creationComplete="openWin()"

I have the following:
public function openWin():void{
if(component1!=null||component1!=""){
openComponent1();
} else if(component2!=null||component2!=""){
openComponent2();
} else {
openMain();
}

the behaviour i see using this method is that everytime I load the
application (regardless of the flashvars) it always loads Component1.

What am I doing wrong here ?
Please advise...

Rohan
http://opentube.info

 





--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED]
http://www.stretchmedia.ca


RE: [flexcoders] loading mxml components based on flashvars

2007-06-04 Thread Alex Harui
If your script block looks like that, then you're assigning compon1 and
component2 at instantiation time.  Properties are generally not
available until later so I'd do the assignment in commitProperties or
the initialize event.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rohan Pinto
Sent: Monday, June 04, 2007 8:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] loading mxml components based on flashvars

 

Hi Folks,

I'm passing component ID's into my app using flashvars.

in my main Application, I procure the values as follows:
[Bindable]
public var component1:String;

[Bindable]
public var component2:String;
component1=this.parameters.component1;
component2=this.parameters.component2;

in the function as defined in my main Application : 
creationComplete="openWin()"

I have the following:
public function openWin():void{
if(component1!=null||component1!=""){
openComponent1(); 
} else if(component2!=null||component2!=""){
openComponent2(); 
} else {
openMain(); 
}

the behaviour i see using this method is that everytime I load the
application (regardless of the flashvars) it always loads Component1.

What am I doing wrong here ?
Please advise...

Rohan
http://opentube.info  

 



RE: [flexcoders] Loading mxml Components

2005-08-01 Thread Mehdi, Agha
Title: Loading mxml Components





Great. Thanks a bunch Matt.


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Matt 
ChotinSent: Monday, August 01, 2005 9:54 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Loading mxml 
Components


You can start here: http://manish.revise.org/2005/04/resizable-titlewindow-in-flex.html
 
Matt
 




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, AghaSent: Monday, August 01, 2005 9:45 
PMTo: 'flexcoders@yahoogroups.com'Subject: RE: [flexcoders] Loading mxml 
Components
 
Hi 
Matt,
 
Yeah, I realized after 
posting my thread that we have PopUp Managers to do that sort of thing. But now 
I'm stuck at another problem. I am creating TitleWindow as a popup. How can I 
make it so that users can resize/minimize/maximize 
it?
 
Thanks
 
Agha
 



From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Matt ChotinSent: Monday, August 01, 2005 8:27 
PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Loading mxml 
Components
You can tell the Panel 
instance to createChild and pass in the MXML component you want it to 
instantiate.  I'm assuming you want to do this programmatically, this isn't 
a Panel containing a single kind of component that you could easily write in 
MXML?  When you say the Panel needs to lay on top, does it need to stick 
around for a while?  Or this the sort of thing you could use the 
PopUpManager for?  If you need it to move around but not be a popup you're 
going to need to have your Application have a Canvas.  Then the Canvas can 
contain a VBox that is sized to the same size as the Canvas.  And then you 
can add the Panel to the Canvas which will allow the Panel to move around and on 
top of the VBox.
 
HTH,
Matt
 




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, AghaSent: Monday, August 01, 2005 4:54 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Loading mxml 
Components
 
Hi 
all,
I need to create a 
panel control and load another mxml component into that and 
partially lay the panel on top 
of the current app. How do I go 
about doing that?
Thanks
Agha 
Mehdi
IDT - eBusiness 
Program Manager
Work: 
408.284.8239
Fax:   
408.284.2766
 

To ensure compliance with requirements imposed by the IRS, we 
inform you that any U.S. federal tax advice contained in this document 
(including any attachments) is not intended or written to be used, and cannot be 
used, for the purpose of (i) avoiding penalties under the Internal Revenue Code 
or (ii) promoting, marketing or recommending to another party any transaction or 
matter addressed herein.This email may contain confidential and 
privileged material for the sole use of the intended recipient(s). Any review, 
use, distribution or disclosure by others is strictly prohibited. If you are not 
the intended recipient (or authorized to receive for the recipient), please 
contact the sender by reply email and delete all copies of this 
message.To reply to our email administrator directly, send an email 
to[EMAIL PROTECTED]Littler Mendelson, 
P.C.http://www.littler.com





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Computer software testing
  
  
Macromedia flex
  
  
Development
  
  


Software developer
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  










To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this document (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com




RE: [flexcoders] Loading mxml Components

2005-08-01 Thread Matt Chotin
Title: Loading mxml Components










You can start here: http://manish.revise.org/2005/04/resizable-titlewindow-in-flex.html

 

Matt

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, Agha
Sent: Monday, August 01, 2005 9:45
PM
To: 'flexcoders@yahoogroups.com'
Subject: RE: [flexcoders] Loading
mxml Components



 

Hi Matt,

 

Yeah, I realized after posting my thread
that we have PopUp Managers to do that sort of thing. But now I'm stuck at
another problem. I am creating TitleWindow as a popup. How can I make it so
that users can resize/minimize/maximize it?

 

Thanks

 

Agha

 







From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Monday, August 01, 2005 8:27
PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Loading
mxml Components

You can tell the Panel instance to
createChild and pass in the MXML component you want it to instantiate. 
I'm assuming you want to do this programmatically, this isn't a Panel
containing a single kind of component that you could easily write in
MXML?  When you say the Panel needs to lay on top, does it need to stick
around for a while?  Or this the sort of thing you could use the
PopUpManager for?  If you need it to move around but not be a popup you're
going to need to have your Application have a Canvas.  Then the Canvas can
contain a VBox that is sized to the same size as the Canvas.  And then you
can add the Panel to the Canvas which will allow the Panel to move around and
on top of the VBox.

 

HTH,

Matt

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, Agha
Sent: Monday, August 01, 2005 4:54
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Loading mxml
Components



 

Hi all,

I need to create a panel control and load
another mxml component into that and partially lay the panel on top of the current app. How do I go about doing that?

Thanks

Agha Mehdi

IDT - eBusiness Program Manager

Work: 408.284.8239

Fax:   408.284.2766

 









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this document (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com



RE: [flexcoders] Loading mxml Components

2005-08-01 Thread Mehdi, Agha
Title: Loading mxml Components





Hi Matt,
 
Yeah, I realized after posting my thread that we have PopUp 
Managers to do that sort of thing. But now I'm stuck at another problem. I am 
creating TitleWindow as a popup. How can I make it so that users can 
resize/minimize/maximize it?
 
Thanks
 
Agha


From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Matt 
ChotinSent: Monday, August 01, 2005 8:27 PMTo: 
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Loading mxml 
Components


You can tell the Panel 
instance to createChild and pass in the MXML component you want it to 
instantiate.  I'm assuming you want to do this programmatically, this isn't 
a Panel containing a single kind of component that you could easily write in 
MXML?  When you say the Panel needs to lay on top, does it need to stick 
around for a while?  Or this the sort of thing you could use the 
PopUpManager for?  If you need it to move around but not be a popup you're 
going to need to have your Application have a Canvas.  Then the Canvas can 
contain a VBox that is sized to the same size as the Canvas.  And then you 
can add the Panel to the Canvas which will allow the Panel to move around and on 
top of the VBox.
 
HTH,
Matt
 




From: 
flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, AghaSent: Monday, August 01, 2005 4:54 
PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Loading mxml 
Components
 
Hi 
all,
I need to create a 
panel control and load another mxml component into that and 
partially lay the panel on top 
of the current app. How do I go 
about doing that?
Thanks
Agha 
Mehdi
IDT - eBusiness 
Program Manager
Work: 
408.284.8239
Fax:   
408.284.2766






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Computer software testing
  
  
Macromedia flex
  
  
Development
  
  


Software developer
  

   
  







  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  










To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this document (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com




RE: [flexcoders] Loading mxml Components

2005-08-01 Thread Matt Chotin
Title: Loading mxml Components










You can tell the Panel instance to
createChild and pass in the MXML component you want it to instantiate.  I’m
assuming you want to do this programmatically, this isn’t a Panel containing
a single kind of component that you could easily write in MXML?  When you say
the Panel needs to lay on top, does it need to stick around for a while?  Or
this the sort of thing you could use the PopUpManager for?  If you need it to
move around but not be a popup you’re going to need to have your
Application have a Canvas.  Then the Canvas can contain a VBox that is sized to
the same size as the Canvas.  And then you can add the Panel to the Canvas
which will allow the Panel to move around and on top of the VBox.

 

HTH,

Matt

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, Agha
Sent: Monday, August 01, 2005 4:54
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Loading mxml
Components



 

Hi all,

I need to create a panel control and load
another mxml component into that and partially lay the panel on top of the current app. How do I go about doing that?

Thanks

Agha Mehdi

IDT - eBusiness Program Manager

Work: 408.284.8239

Fax:   408.284.2766









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.