Preload txt/asp

I have read over lots of preloader tuts and threads here at Kirupa, nothing seems to fit just write. I am loadind a external asp/txt file into flash and I would like to preload the file 1st before I display the data in Flash. Does the asp/txt file act like an external swf, or whats the deal here ?

Hrmm… I know you can preload loaded .swf files and dynamically loaded images and sounds, but I don’t think you can preload .txt files.

Not 100% on that, but as far as I know you can’t.

Here is a link of what I’m trying to do, but its a bit complex for me.
If you have the time take a peak.

www.smartwebby.com/Flash_and_ASP/Flash_preloader.asp

I think that tutorial is pretty self explanitory, I don’t work with ASP or anything so I can’t test it out or try it or anything.

OK When I load my External asp/txt file I put an
&end=true statement at the end of the file.

Then in flash I need to set up a proper if statement. I need two looping frames, a looping movieclip or a clipevent to check over and over to see if end is true yet. Once END is true, your other variables must all be loaded.

Help how do I do this???

Here is the link of the page I found this info at.

http://www.actionscript.org/tutorials/beginner/loadVariables_and_loadVars/index2.shtml

the term is Swonking:smirk:

Ermmm…

Frame 1

if (end == true){
//do this
}

Frame 2

gotoAndPlay(1);

I think that is how it would go. This is of course assuming your loop is on frames 1 and 2, edit as neccessary (if it works at all)

Thanks,
I think you need true in side of " ".

if (end == “true”){

I’ll be back:cool:

maybe…lol.

true itself is a statement and can be read in an if statement like that… actually, not that I think of it… I think it would be like this…

if (end) {
//do this
}

Because that says if end is true.

Where is if you are checking for not true, it would be…

if (!end) {
//do this
}

That says if this end is false, do this.

So I should change the asp/txt file to end instead of end=true.
Because the true statement in the asp/txt file is not telling flash its true, flash just sees the text and runs accordingly.

I think

No, you should leave it as false…

I am reading this tutorial and I see nothing about anything being true or false :-\

I E-mailed actionscript.org and got them to post a Fla.

Check it out at; http://www.actionscript.org/tutorials/beginner/loadVariables_and_loadVars/index2.shtml
In the paragraph called Swonking.

The fla. he posted are for loadvariables and loadvariablesNum.

Well $#^%!@$, I’m not using either one off those!!!

I load my asp/txt file like;
file = new LoadVars();
file.load(“http://www.asp.txt”);

So whats the difference and /or how could I begin to change my code to work with loadvariables or loadvariablesNum?

Um, I thought that was the whole point of a downloadable source file.

To see how they used the method.

You are loading a .txt file… they are loading a .txt file… I don’t see any confusion :-\

This is where I fall apart.

There are 3 ways to load a txt. file into flash

LoadVars-------------this is my way
loadvariables------------- tutorial
loadvariablesNum------- tutorial

I change my code to use loadvariables, but then nothing works because the rest of my code uses the LoadVars.

AAAAAhh:x

Well change your loadVars to loadVariables :-\

I am sorry, this really isn’t my area, I worked a little bit with loadVariables, but never loadVars.

why are developers choosing loadVariables over LoadVars, when its obviously LoadVars is more powerful!!

waffe, i can help u using LoadVars, but just tell me, wut do u need exactlly!

yours,

h88

loadVars can solve yar timing problem, something like:

fileURL = "textfile.txt"

myVars_obj = new LoadVars()
//u could have set of instructions onLoad of the text file like:
myVars_obj.onLoad = function () {
message.text = myVars_obj.message//it will assign message.text to MyVars_obj message
}

//and this will load ur text file

myVars_obj.load(fileURL)

this is very simple way

more powerful way is to define success parameter within the function:

fileURL = "textfile.txt"

myVars_obj = new LoadVars()
myVars_obj.onLoad = function (success) {
if (success) {
message.text = myVars_obj.message
} else {
message.text = "Error loading file"
}
}

myVars_obj.load(fileURL)

yours,

My topic is still preloading a asp/txt file into flash.
I must make sure all asp/txt is loaded before I populate a listbox.
As you can see I found a tutorial on this topic at actionscript.org.
The method of preloading an asp/txt file is called swonking, but it appears you can only do this with loadvariables/loadvariablesNum.

My code uses loadVars and since it is a more powerful way I would like to keep using it. But, is there a way to preload my asp/txt file in flash using loadVars.
:smirk:

I did not see the 2nd page of info you left me h88, let me look it over and I’ll get back to ya.

Thanks

Bill

ok, but let me tell u, i could only help if it comes to loading txt, am not into asp!

yours,