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

Caching .txt files?

New Here ,
May 09, 2008 May 09, 2008
In Flash 7 if you have a dynamic text field which is populated by an external .txt file I don't ever remember having to clear my cache to view my newly updated text. In Flash 8 this is now a problem. I want the main movie cached but not the dynamic text. I've looked around the forums and there are several solutions to not cache the entire thing. How do you not cache a .txt?

Thanks
TOPICS
ActionScript
468
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 , May 09, 2008 May 09, 2008
your code is incorrect. use:

Translate
Community Expert ,
May 09, 2008 May 09, 2008
append a changing variable to your load() or loadVariables() or loadVariablesNum() method:

textLV.load("textfile.txt?nocache="+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
New Here ,
May 09, 2008 May 09, 2008
Thanks for your reply and sorry for the dumb question:

where do I put that variable?

This is how I load it:

_root.blog_mc.loadVariables("blog_text.txt",_root.blog_text);

Thanks
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 ,
May 09, 2008 May 09, 2008
your code is incorrect. use:

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
New Here ,
May 09, 2008 May 09, 2008
Fab! Works perfect!

Ta!
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 ,
May 09, 2008 May 09, 2008
LATEST
great.
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