Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: F5 better actionscripting - looping question
From: jmerrill
Date: Fri, 22 Dec 2000 18:47:02 GMT


I have an "improvement" question. The following F5 actionscript works OK
for me:

var1 = otherVar1+name1+otherVar2+newline
var2 = otherVar1+name2+otherVar2+newline
var3 = otherVar1+name3+otherVar2+newline
var4 = otherVar1+name4+otherVar2+newline
var5 = otherVar1+name5+otherVar2+newline
var6 = otherVar1+name6+otherVar2+newline
var7 = otherVar1+name7+otherVar2+newline
var8 = otherVar1+name8+otherVar2+newline
var9 = otherVar1+name9+otherVar2+newline
combinedVars = var1+var2+var3+var4+var5+var6+var7+var8+var9;

However, I know this is not the most efficient way of doing this, and
comming from Authorware, I know this can be done with a repeat loop. I
just don't know how to say it in actionscript. Would it be something like,

n=1;
while (n<10) {
var(n) = otherVar1+name(n)+otherVar2+newline;
n++;
}

? I know this isn't quite right, can someone see what I'm trying to do,
and point me in the right direction?

Thanks

Jason Merrill
Multimedia/Courseware Developer @ ELF, Issaquah, WA
425.369.5214
SerengetiUS.com - "Where Law Does Business"

Seattle Macromedia Authorware User's Group


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: F5 better actionscripting - l, Gregg Caines
  Re: FLASH: F5 better actionscripting - l, Helen Triolo

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]