[FMX] unique identifier on .txt?

Hi kirupa folks. first post!

i have an externally loaded .swf file i’m loading into a container mc with a unique identifier. that .swf file itself is dynamically loading a .txt file into a text box.

how do you script the .txt file to have a random identifier? a code on the actual .txt file or actionscript on the buttons that call the .txt file?

i have a few buttons that when pressed load a new .txt file into the text box called newsBox. the buttons have this code:

[color=#000087]on[/color] (release) {
loadText = [color=#000087]new[/color] [color=#000087]loadVars/color;
loadText.[color=#000087]onLoad[/color] = [color=#000087]function/color {
[color=#000087]if[/color] (success) {
[color=#878787]// trace(success);
[/color] newsBox.[color=#000087]html[/color] = [color=#000087]true[/color];
newsBox.[color=#000087]htmlText[/color] = [color=#000087]this[/color].content;

what i want to make sure is that when called upon, the new .txt file is loaded and not the one on the user’s cache.

any help or clarification on this would be GREATLY appreciated!

do something like this:

on (release) {
loadText = new loadVars();
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.content;

Thanks a ton paradox! i wasn’t sure where to place the random code. i’ll experiment with that code today.