Flasher Archive

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


Subject: Re: FLASH: F5 better actionscripting - looping question
From: Helen Triolo
Date: Fri, 22 Dec 2000 19:59:34 GMT

Hi again Jason (Rome can just wait ;-),

Haven't tried it, but in that case, it might work if you replace "_root"
with "this" (assuming othervar1 and othervar2 and combinedVars are also
in that clip, otherwise you'll have to give them correct path
identifiers, like _root.othervar1, or _root.othermc.othervar1):

for (i=1; i<10; i++) {
this["var"+i] = othervar1 + this["name"+i] + othervar2 + newline;
combinedVars = combinedVars + this["var"+i];
}

Regards,
Helen
-----------------------------------------------------
i-Technica · http://i-technica.com · 301.424.6037
developer resources: http://i-technica.com/whitestuff

jmerrillatelftech [dot] com wrote:
>
> Thanks. However this script still will not work for me. Could it be
> becasue "_root" is not finding the variable I am referring to, which is a
> string variable loaded from an external text file in the same script using:
>
> onClipEvent (load) {
> loadvariables ("text.txt", "");
> }
>
> Will "_root" still be applicable if I am loading variables this way? I
> assume so, the script is an action assigned to a MC. It should work,
> right? Since the variables are loaded into the same level?
>
> Helen's example:
>
> combinedVars = "";
> for (i=1; i<10; i++) {
> _root["var"+i] = othervar1 + _root["name"+i] + othervar2 + newline;
> combinedVars = combinedVars + _root["var"+i];
> }
>

> >
> > 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;
> >

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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, jmerrill

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