//var ["s"+i]:Number = flashSQL.MoveNext["var8"+i];
//Number(["s"+i]);
That's like black magic or something. Several things wrong there. You
need to learn to use some traces in your code to know where it's
breaking, but basically, the array access operator is used to evaluate
an object name in an object. So in other words, you need to use the
proper scope
this["rec"+i]
Means (on a frame script), the current timeline: rec1 instance, rec2
instance, rec3 instance, etc.
Also, name your instances starting with 0 instead of 1, will be easier
for you since arrays start at 0.
for (var i = 0; i<7; i++) {
var myTempNumber:Number = //whatever you do to get the number
this["rec"+i].text = myNumber
}
Also, s+Something will never be a number - no numbers I know of start
with "s".
Hope that helps,
Jason Merrill
Bank of America
Learning & Organization Effectiveness - Technology Solutions
>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Laurent CUCHET
>>Sent: Monday, September 18, 2006 9:39 AM
>>To: Flashcoders mailing list
>>Subject: [Flashcoders] >> For and Var
>>
>>I try to use for to fill different var, but it doesnt work
>>
>>for (var i:Number = 1; i<=7; i++) {
>> var ["s"+i]:Number = flashSQL.MoveNext["var8"+i];
>> this["rec"+i].text = Number(["s"+i]);
>>}
>>
>>Var make errors , do you see why ?
>>
>>Thank you
>>_______________________________________________
>>[email protected]
>>To change your subscription options or search the archive:
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>Brought to you by Fig Leaf Software
>>Premier Authorized Adobe Consulting and Training
>>http://www.figleaf.com
>>http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com