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

URLLoader not working in good way when swf in server

Explorer ,
Feb 21, 2019 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.

TOPICS
ActionScript

Views

278

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
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());

Votes

Translate

Translate
Community Expert ,
Feb 21, 2019 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());

Votes

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
community guidelines
Explorer ,
Feb 22, 2019 Feb 22, 2019

Copy link to clipboard

Copied

Can you explain how it works?

Votes

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
community guidelines
Community Expert ,
Feb 22, 2019 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".

Votes

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
community guidelines
Explorer ,
Feb 22, 2019 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 = []?

Votes

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
community guidelines
Community Expert ,
Feb 22, 2019 Feb 22, 2019

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines