How to load text from a *.txt?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2003   #1
How to load text from a *.txt?

Hi,

I'm trying to get a Dynamic text field to load text from a *.txt file, so that I only have to upload a revised *.txt file to my server when I want to change the text in my FlashMX website. Obviously this means I don't have to actually go into flash and edit the text, publish then upload.

How do I do it?
 
Old 02 February 2003   #2
loadVariablesNum("file.txt",0);

In your file you should have
varname = the text you want to display

And in your movie you simply display the variable varname into a dinamic text field.

Question:
Does anybody know how to define multiple variables into a txt file?
 
Old 02 February 2003   #3
http://www.flashkit.com/tutorials/A...a-139/index.php

and there you go
 
Old 02 February 2003   #4
...both of you
 
Old 02 February 2003   #5
its a good idea to make a variable "&loaded=1" at the end of the textfile, so in flash you can check if the text has loaded and play a loading animation or something like that while it hasn't
__________________
character WIP: c&c please ;)
 
Old 02 February 2003   #6
Thank you guys... I'll give it a go.
 
Old 02 February 2003   #7
I can't get it to work. I have tried absolutely everything! It won't farking work!
 
Old 02 February 2003   #8
ok, finally I managed to get it to work in a completely new blank file.

I also got it to get a little further in my website, problem is that instead of loading the variable's content into the dynamic text box it actually opens a new explorer window and opens the text file completely as it is written. WTF!???

&content=dog
cat
mouse
 
Old 02 February 2003   #9
some more info... I got it to at least launch the text file in explorer because I figure the problem is maybe because of levels (not that I have used any! thats why its so weird)

loadVariablesNum("bbcontent.txt",_root);

normally you replace the "_root" with "0" but at least _root did something...!
 
Old 02 February 2003   #10
AHA! I figured out something...

The layer on which I am placing the dynamic text box is masked, when I remove the mask it works. I have checked if other content can be displayed underneath this mask (b&w / vice versa).

Static text works whilst under a mask, but dynamic text doesn't!

Are there any solutions or little tricks to get it to work under the mask?
 
Old 02 February 2003   #11
first thing that comes to me mind...dunno if it will work

put the dynamic text in a movieclip and mask the movieclip?
 
Old 02 February 2003   #12
embed the font of your dynamic textfield by clicking on the "embed fonts" buttons in the text options
__________________
character WIP: c&c please ;)
 
Old 01 January 2006   #13
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
  share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:32 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.