Discussion:
undefined text
(too old to reply)
plwebmaster
2009-03-20 21:23:27 UTC
Permalink
The dynamic text box in the bottom right of this page: www.plps.org/boe.swf
generally gives me an 'undefined' message. Sometimes it loads if I hit refresh
enough times. I inherited this web page and have taught myself how to modify
and change things for the most part - but I am obviously missing something
here. What things do you need to do when you set up a dynamic text box that
load text from a .txt file?
NedWebs
2009-03-20 21:45:40 UTC
Permalink
You generally need to wait for the text file to completely load before trying to utilize its data.
plwebmaster
2009-03-20 22:15:02 UTC
Permalink
Thanks. Is there anything that would cause it to load faster or slower?
NedWebs
2009-03-21 00:25:40 UTC
Permalink
Just the route it takes getting from where it lives to where it's going, which
is undeterminable when it comes to internet.

You should use an event listener for the loading of the text file so that you
don't try working with the data until it's been fully received.
plwebmaster
2009-03-21 00:35:16 UTC
Permalink
Not sure what an event listener is. The file it is loading resides in the same
folder - or just inside a folder within the same folder. When I update the
website, I just replace the .txt file with a new file of the same name. I
assumed that it would just go out to that file each time and load the text from
the new file.
plwebmaster
2009-03-21 00:37:51 UTC
Permalink
Ned

Any chance you can help with my other problem - listed under the 'double frames' thread?

Thanks!!
NedWebs
2009-03-21 02:11:57 UTC
Permalink
When you load a file, any file, regardless of where it lives, to get to the
machine that it's loading to (aka: anyone's pc) it can literally travel around
the world before it actually gets where it going. Your Flash file could take
one route while the text file takes a completely different route--it's all a
matter of how the data gets routed, which is not a fixed path. So the time it
takes to get there can vary.

For any file that you load, you should have something in place to detect when
the file is fully loaded before trying to act on whatever data it holds. Flash
provides for this, though how you implement it depends on which version of
actionscript you're using.
NedWebs
2009-03-21 02:13:22 UTC
Permalink
As for your double frames issue, to be honest, I looked at your explanation and
I looked at the web page, and it both cases I can't tell what you are
describing. so at this point, I am not in a position to try to help.
Continue reading on narkive:
Loading...