Highlighted

URLLoader not working in good way when swf in server

Explorer ,
Feb 21, 2019

Copy link to clipboard

Copied

I use some URL loaders in my swf to get lines from txt file in server. BUT when I do tests on my compiuter it works fine, I had some isues before but now it works good. But when i upload swf in html in web browser I have some problems. FOR EXAMPLE: In TXT file i have lines for example: Hello Bye Hey Swf shows lines: Hello Bye Hey BUT if i change lines in TXT for example: Hello friend Bye my love Hey, how are you Swf shows lines: Hello Bye Hey WHY I SEE OLD LINES FROM TXT FILE> in every case I have new call to this URL loader but see old lines. Why this hapening? I use for these test string var textline = []; maby here is the problem? Sometimes swf uploading new (right) lines from txt files, when I try this other day 😄 Or after some time. Maby some ideas why this happening? All permisions for files in server is 777.

Adobe Community Professional
Correct answer by kglad | Adobe Community Professional

you're loading a cached file.

append something to the file name to prevent that.  eg,

var urlReq:URLRequest('yourfile.txt?version='+Math.random());

TOPICS
ActionScript

Views

145

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

URLLoader not working in good way when swf in server

Explorer ,
Feb 21, 2019

Copy link to clipboard

Copied

I use some URL loaders in my swf to get lines from txt file in server. BUT when I do tests on my compiuter it works fine, I had some isues before but now it works good. But when i upload swf in html in web browser I have some problems. FOR EXAMPLE: In TXT file i have lines for example: Hello Bye Hey Swf shows lines: Hello Bye Hey BUT if i change lines in TXT for example: Hello friend Bye my love Hey, how are you Swf shows lines: Hello Bye Hey WHY I SEE OLD LINES FROM TXT FILE> in every case I have new call to this URL loader but see old lines. Why this hapening? I use for these test string var textline = []; maby here is the problem? Sometimes swf uploading new (right) lines from txt files, when I try this other day 😄 Or after some time. Maby some ideas why this happening? All permisions for files in server is 777.

Adobe Community Professional
Correct answer by kglad | Adobe Community Professional

you're loading a cached file.

append something to the file name to prevent that.  eg,

var urlReq:URLRequest('yourfile.txt?version='+Math.random());

TOPICS
ActionScript

Views

146

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

you're loading a cached file.

append something to the file name to prevent that.  eg,

var urlReq:URLRequest('yourfile.txt?version='+Math.random());

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Explorer ,
Feb 22, 2019

Copy link to clipboard

Copied

Can you explain how it works?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 0
Adobe Community Professional ,
Feb 22, 2019

Copy link to clipboard

Copied

your file name is changed each time it's loaded so it looks different and the cached version is not retrieved.

if you want more info, google "query string".

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 0
Explorer ,
Feb 22, 2019

Copy link to clipboard

Copied

Okey. It woek good. In next my works maby I can use something esle than var blablabla = []?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 0
kglad LATEST
Adobe Community Professional ,
Feb 22, 2019

Copy link to clipboard

Copied

you can use something else as long as it generates a name that doesn't match a cached file name.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 0