PDA

View Full Version : Help I'm going mad


AndrewLewis
07-14-2004, 03:12 PM
well I think I have tried everything now
all I want is to load a text file into a dynamic text field
I've followed the flash tute and it works with the tute
but I can't make the text load in any thing else
(even if I use the text file and the script from the tute)
If any one can be bothered could you please explain how the thing works

Ta


Feeling Stupid

tg
07-14-2004, 03:40 PM
you might want to post this in the tutorial forums. and reference the tutorial your having a problem with, and post some portions of your code in the thread.

boyzdynasty
07-14-2004, 04:26 PM
better yet...if you can post the *.fla

Jahepi
07-14-2004, 04:46 PM
here is an example:



bye :)

boyzdynasty
07-14-2004, 05:05 PM
here is an example:



bye :)so what's wrong? It seems to work for me.
However, I don't know why you have this code:

System.useCodePage = true;

Jahepi
07-14-2004, 05:14 PM
with that line im able to use the letter Ñ in dynamic text, btw im not the person who has the problem. :D

bye

boyzdynasty
07-14-2004, 08:35 PM
oh *lol

:D :p

I thought you were....i got you mixed up *lol

AndrewLewis
07-15-2004, 12:32 AM
Jahepi thanks for your thoughts, all I get is "Cargando texto..." is this what I'm meant to see?
I will play around with it and see what I can do, in the mean time here is my last failed attempt


hope you can help

Drew

Jahepi
07-15-2004, 02:35 AM
I couldnt open it cuz i dont have flash 2004, but i saw the txt file and the variable that indicates where is the text, doesnt exist, for instance:

here is the frame code:

_root.carga = "Cargando texto...";
informacion = new LoadVars();
informacion.load("envase.txt"); // the text file must be in the same location as swf file.
informacion.onLoad = function(cargo) {
if (cargo) {
todo.escrito.html = true;
todo.escrito.htmlText = this.envase; //this is the variable that must be in the text in order to appear.
_root.carga = "";
}
};



so inside the text file, must be something like this:


envase= blablablablablablablablablabla.

if u want to add more text in another variable u can do it like this:


envase= blablablablablablablablablabla.
&envaseuno= blablablablablablablablablabla.

so in order to make the second variable appears u must write something like this:

_root.carga = "Cargando texto...";
informacion = new LoadVars();
informacion.load("envase.txt"); //the text file must be in the same location as swf file.
informacion.onLoad = function(cargo) {
if (cargo) {
todo.escrito.html = true;
todo.escrito.htmlText = this.envaseuno; //this is the second variable that must be in the text in order to appear.
_root.carga = "";
}
};


i hope it helps u to figure out
bye:)

AndrewLewis
07-16-2004, 04:02 AM
well it appears that I am getting closer to knowing what isn't working, I've now tried to do a "test movie" to my now very basic file and I get this:

Error opening URL "file:///C|/My%20Docs/Flash/experiments/texttest.txt"

in the output box
I'm sure this is all pretty basic stuff too you guy's n gal's but I'm an ultra newbie, never done any code or anything before really, next are the two different lines of script I've tried the fist gives the above + "undefined" the second nothing at all:

testtext = new LoadVars ();
texttest.load = ("texttest_txt.txt");
texttest.onload = function(TextField_txt) {
if (TextField) {

}

texttest = new LoadVars();
texttest.load("texttest.txt");
texttest.onLoad = function(textField) {

};

I'm sure the second one is just me being stupid but I tried it anyway,


thanks for your time

Drew

};