I am a bit out of my league here, but isn't it the case that to do what
you want, you need an array or *references* to the variables?  And
aren't "primitive" data typed variables really literal values and not
references?

 

Hmm, if you can enforce a naming convention, you could do:

function {

for ( var i = 0; i<nSomeNumber; i++ ) {
this["myVal " +  i ] = true;
}
}

(maybe a do while, instead of for?)

Tracy

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Bjorn Schultheiss
Sent: Wednesday, March 07, 2007 5:29 PM
To: [email protected]
Subject: [flexcoders] Setting Multiple Bindable Properties

 

Hey Ya'll

let me eloborate, say i have:

[code]

[Bindable] var myVal1:Boolean;
[Bindable] var myVal2:Boolean;

[/code]

and i want to update the values (which in turn would update the 
'view' ) via an array loop, intuitively i would code

[code]

function {
var myArray = [ myVal1, myVal2 ]
for ( var i = 0; i<myArray.length; i++ ) {
myArray[ i ] = true;
}
}

[/code]

Of course this does not update the bindable values but rather the 
arrays' indexed items.

How can i achieve this result?

Regards,

Bjorn

 

Reply via email to