Senior Member
auto load data.txt
right now I have a news section on my website that reads off of an external "data.txt" file
but the way I have it set up now (the only way I could find to work) was to have a button with the actionscript:
on (press) {
loadVariables("data.txt", "_root.text_box");
}
is there a way for that to automatically be loaded? so i can just get rid of the button?
thanks
Just add the code to frame 1 of your animation.
loadVariables("data.txt", "_root.text_box");
Code doesn't have to be inserted into a button. The movie itself can run any script that you place in a frame.
here try this
loadVariables("data.txt", _level0, "POST");
and has long as the text box matchs the variable in the .txt file then it will auto load ... I'm adding the .fla and .txt file
Attached Files
Between Flash & Flashkit
I want to learn .
wannabe flasher [ Actionscript 2.0 ]
Senior Member
thanks guys, I tried it all, and seeing the errors I was getting with what you gave me helped me do it right
I ened up using this
in the first frame of the MC in which the dynamic texy was located
onClipEvent (load) {
loadVariables("data.txt", "_root.text_box");
}
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