-
Load a text file
Hello all together my name is chris, i am very new to flash worked before in VB.net so this question might be a little DUMB.
i have a flash file where i have created a text it is dynamic
i would need to get evry 10 seconds an update on this text from a file called
update.txt
I AM REALLY LOST since this is the 3 day i am using flash normaly i find evrything i need on the web with help of mr. google but this time i failed!
i am not a "script kiddy" but this time i really could use some help or code THX 1000 times in advance ps.: i am using the old macromedia flash thing 8
-
Senior Member
Can you upload your FLA - whatever you have tried ? OR should I create a new one for you ?
-
Prid - Outing
Say your dynamic textfield's Instance Name (select it, open Properties Panel [CTRL+F3], type something in the textfield labeled, Instance Name) is for instance, my_txt, and your .txt file is on the same folder as the Flash file, use this code on your Frame (select Frame, open Actions Panel [F9]):
Actionscript Code:
function updateText(){ loadText = new LoadVars(); loadText.onData = function(data){ my_txt.text = data; // change my_txt to your dynamic textfield's Instance Name } loadText.load("update.txt"); }
updateText();
setInterval(updateText, 10000);
Hope this helps
POST #1234 - hahahaha xD
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|