Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating text

Status
Not open for further replies.

aph

Technical User
Jul 8, 2000
134
GB
Hi all,
I have a client that wants to update a text section on a regular bases that is part of a swf file how do i link the the external text file to the swf file?

(the build is a HTML page with a 1x1 table in it that contains the pages swf content.)
Should the text doc go into the same parent folder as where the swf file is ?

thanks if anyone can help

andy
 
Yes!

Regards,

cubalibre2.gif
 
Not necessarily - you can put the text file whereever you want as long as you include a path so that the swf can access it, you could stick it in a subfolder making the path:

'text/textfile.txt'

or in the directory above the swf in which case the path becomes:

'../textfile.txt'

or give it an absolute address such as:

'
 
Same folder would just be the easiest!

As we are talking about a client uploading! Can't ask to much of them!

Regards,

cubalibre2.gif
 
i always leave this to clients......just leave instructions in the text file...do's and dont's and they will be fine
 
thanks for the info folks how do I go about coding this?
EG what action script do I to connect the text with the swf file?
 
mydata = new loadvars();
mydata.onload = function(){
mytext.html = true;
mytext.htmltext = mydata.theText;
}
mydata.load("theFile.txt");


//where the text file starts &theText=blahblah

and the dynamic text box has an instance name of mytext
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top