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


[flexcoders] loading mxml components based on flashvars

2007-06-04 Thread Rohan Pinto
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 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 http://opentube.info