all groups > flash actionscript > september 2006 >
You're in the

flash actionscript

group:

loadVariablesNum not working with loadMovie


loadVariablesNum not working with loadMovie Darwerk
9/23/2006 9:44:32 PM
flash actionscript:
Please help. I am new to Flash so maybe there is something easy that I am
missing. The loadVariableNum works fine to load text from an external .txt file
in my original .fla and .swf file, but when I use loadMovie to load that
original file into another it shows everything accept for the imported text.

Any help you can offer will be greatly appreciated.

Thank you.
Re: loadVariablesNum not working with loadMovie kglad
9/23/2006 9:52:14 PM
you're probably loading your variables into _level0, correct? and when you do
that your variables are defined on the _level0 timeline which is the main
timeline when your original.swf runs alone and is the main timeline in the
loading swf (and not the main timeline in original.swf) when you use
loadMovie() to load original.swf.

to remedy, you could change your loadVariablesNum() (NOTE: it's not
loadVariableNum) to this.loadVariable() on the main timeline in your
original.swf.
Re: loadVariablesNum not working with loadMovie Darwerk
9/23/2006 11:31:02 PM
First, please allow me to clarify my file names so that I can better understand
your answer. Lets's call the main site file "main.swf". "Main.swf" is the file
with the loadMovie scripts. Then the files with the loadVariablesNum script are
called "updates.swf" and "shows.swf".

Second, Where do I find loadVariable() in the Actions palette? If I change
Location from Level to Target it changes the script from loadVariablesNum to
loadVariables. Is that what you mean. If so, what should I do about the target?

Thank you for the help. I really appreciate it.
Re: loadVariablesNum not working with loadMovie kglad
9/23/2006 11:43:03 PM
just type

this.loadVariables("yourTextFile.txt"); // <-- use the correct name for
your text file

in updates.swf and in shows.swf instead of your loadVariablesNum() statements.
you can use your keyboard (or cut and paste).

the target will be the timeline (this) that contains your loadVariables()
statement. as long as that's your main timeline, everything will probably
work.
Re: loadVariablesNum not working with loadMovie kglad
9/24/2006 3:42:40 AM
AddThis Social Bookmark Button