Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

URLLoader not working in good way when swf in server

Explorer ,
Feb 21, 2019 Feb 21, 2019

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.

TOPICS
ActionScript
460
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 21, 2019 Feb 21, 2019

you're loading a cached file.

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

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

Translate
Community Expert ,
Feb 21, 2019 Feb 21, 2019

you're loading a cached file.

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

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 22, 2019 Feb 22, 2019

Can you explain how it works?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2019 Feb 22, 2019

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".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 22, 2019 Feb 22, 2019

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2019 Feb 22, 2019
LATEST

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

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