|
-
Toruble loading txt files
Hi, i have this flash movie in actionscript 3.0 that should load a txt file into a dynamic text file this is the code
the movie is empty but the textbox called "mytext"
Code:
var myLoader:URLLoader = new URLLoader();
myLoader.dataFormat = URLLoaderDataFormat.TEXT;
myLoader.load(new URLRequest("info.txt"));
myLoader.addEventListener(Event.COMPLETE, onLoader);
function onLoader(ev:Event){
trace ("Data loaded");
mytext.text = String(myLoader.data);
}
mytext.multiline = true;
mytext.wordWrap = true;
but everytime i make a publish preview i get the following error (sorry for the spanish error names but u should understand the numbers , anyway 2044 should mean ioError not controlled and 2032 ¿¿secuency error?? i'm not sure because sometimes theese programs use different words over plain translations)
Error #2044: ioError no controlado: text=Error #2032: Error de secuencia. URL: file:///H|/Mis%20Documentos/Paginas%20Web/pruebas%20flash/cargar%20texto/info.txt
at cargador3_fla::MainTimeline/cargador3_fla::frame1()
my text file does not have any kind of format it's only a series of words (dunno if it could be that i have to write something before the text like variables names or something) need some feedback on this.
i've read sometign about needing crossdomain.xml file in the folder os i created one (even i think this sould not be the problem as i'm doing it on my computer. anyway my crossdomain looks like this:
Code:
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
i have been browsing for hours to find whats my problem here but most examples i have tried out give me the same error so i guess is something with the txt file or something with the crossdomain or something nobody says on any example or tute since is so basic (still i have not realized it tho)
txh in advance
-
Senior Member
mytext.text = ev.currentTarget.data;
- The right of the People to create Flash movies shall not be infringed. -
-
that is another way but not the solution
Code:
mytext.text = ev.currentTarget.data;
that is another way of assigning the text data but the problem i have is while loading, i neve get data to the SWF so it does not matter how to assign it.
Is the loader error i'm concerned about.
does any1 know about this
Error #2044: Unhandled ioError: text=Error #2032: Stream Error. URL: file:///H|/Mis%20Documentos/Paginas%20Web/pruebas%20flash/cargar%20texto/info.txt
at cargador3_fla::MainTimeline/cargador3_fla::frame1()
and the file is there!!
-
Senior Member
- The right of the People to create Flash movies shall not be infringed. -
-
still not working
I had already read that, and it is not giving me any solution, as i said i had already created a crossdomain.xml file and of course i have checked the name of the file... and it is there ... any more ideas????
-
Senior Member
Have you tested if your movie works online? In some cases you get an error when you test your movie offline but online it works.
- The right of the People to create Flash movies shall not be infringed. -
-
tested also
yep, i've noticed that sometimes also, but this time i have tested both online and offline with all the codes.
-
Senior Member
- The right of the People to create Flash movies shall not be infringed. -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|