PDA

View Full Version : anyone know if this is possible???


KingCHAD
10-02-2003, 05:39 PM
I have searched all the forums but keep gettin the same reply


i know that you can save and load to a .txt file but can you have a main site were another swf file is loaded into a target then in that movie can you load the .txt

e.g. i have site.swf which has a button in it called diary which loads diary.swf into a target called input then in diary.swf i have this action

loadVariablesNum("text.txt", 0);
loadVariablesNum("text1.txt", 0);
loadVariablesNum("text2.txt", 0);

on the first keyframe then i got three dynamic text fields which load the text from text.txt except it doesn't load the .txt file.


can you do this ??????

webguy
10-02-2003, 05:50 PM
yes it is possible.

this thread is similar to this other thread:
http://www.actionscript.org/forums/showthread.php3?s=&threadid=35453

weird :rolleyes:

webG

McGiver
10-02-2003, 06:06 PM
I think the others agree with me if I say:
this is the wrong place to ask such a question! we got not paid or something like that (ok Jesse and strok do, but their work is worth 10 times more than they earn with asorg). So please try to post your questions where they belong to, and if you get no answer you like, use the SAME THREAD and ask something like "no one an idea? please help me", like the others do! ;)
If any mod can please move this to one of the help forums?!


what you want to do:
you want to load swf2 into swf1
load the variables from the text1 into swf2
and then use the variables in swf 2

your problem is that
loadVariablesNum("text1.txt", 0);
loads the variables into the _root level, and in this case it would be swf1.
to load them into swf2, you should either use
(lets say the txt file contains something like "&myvar=100")
loadVariablesNum("text1.txt", 0);
myvar=_root.myvar
or
this.loadVariables("text1.txt");
in swf2