Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: Help! - combining externally loaded variables, (F5 bug???) |
From: | Phillip Kerman |
Date: | Fri, 22 Dec 2000 14:14:58 GMT |
Almost surely the issue is that you're not giving Flash enough time too
fully load the contents of the external file. The two solutions are "the
old way" and "the new way".
The old way, you place an extra variable in the text file at the end--like
done=1. In frame 1 do your LoadVarNum... then, one frame later (frame 2)
you place an "if" that says "if done==1, then jump to frame 4. In frame 3
you say gotoAndPlay(2) --that is, recheck. Finally in frame 4 you start
trying to use your loaded variables.
The new way requires that you load vars into a clip. Not level 0, not level
2 etc. Use a clip instance name to load into. That clip instance needs a
script that executes onClipEvent(data) --meaning, once all the data is
loaded--that jumps ahead or somehow starts to use the loaded variables. This
method works great. The only issue is that since the variables get loaded
into a clip you'll either need to refer to them (always) like
_root.clipName.varName or move them all into your level 0 (where you're
probably using them--if you had been loading them into level 0). When I say
"move them into level 0" I mean, simply, copy them there. Realize that
numbers and strings copy by value and objects and arrays copy by reference.
(This last issue will probably work out intuitively if you're using
numbers/strings).
Hope it helps.
Phillip
> I posted this yesterday without a response... I know I'm being impatient
> for a reply, but this is driving me nuts! Fixing this would make it a very
> merry Christmas. I narrowed my problem down further, and need help
> solving it.
>
> FACT 1: In F5, I can load & display an external variable, like so:
> (contents of external file, "text.txt")
>
> text=
> &matter1=Alphacon v. Digital Financial, Inc.
> &matter2=Werner Electric v. Jones
> ...this works great - contents of variables "matter1" and "matter2" load
> and displays fine in a dynamic text field using text = loadVariablesnum
> ("text.txt", 0);
>
> FACT 2: I can also combine & display two variables I create in Flash
> internally, like so:
>
> var1="My name is: ";
> var2="Jason";
> sentence= var1+var2; ...this also works great - contents of variable
> "sentence" displays fine in a dynamic text field.
>
> Now, here's the kicker: I can't seem to combine & display two or more
> externally loaded variables! For example:
>
> (contents of external file, "text.txt")
> text=
> &matter1=Alphacon v. Digital Financial, Inc.
> &matter2=Werner Electric v. Jones
>
> (then the actionscript in F5)
> text = loadVariablesnum ("text.txt", 0);
> matters=matter1+matter2;
>
> (dynamic text field set to "matters" displays nothing, while others set to
> display "matter1" or "matter2" display fine!)
> ???????? Am I missing something very obvious? (very possible!)
> Thanks in
> advance...
>
> 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 helpchinwag [dot] com
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 helpchinwag [dot] com
Replies
FLASH: Help! - combining externally load, jmerrill
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]