Hi!

I made a flash file in swish max which loads random text from an external .txt file, and posts it in the flash movie as selectable dynamic text. I'm trying to make the same thing in flash cs6 but cannot make it... I'm getting syntax error and I have no idea of how to resolve this issue..

Here's the link to the Flash file I created in Swish: http://117.boxhost.me/images/gallery/facebook_flash.htm


And here's the script I used to create this:

(SCENE 1) :
Code:
onFrame (2) {

/****************************************
**Random Songs Script*******************
****************************************/


ranStatus = new LoadVars();
ranStatus.onLoad = function(success) {

if (success) {

RanNum = Math.ceil(Math.random()*10);
ran = this["rstatus"+RanNum];
r_status.text = ran;

}
else {

r_status.text = "The text failed to load due to an error";

}

}

ranStatus.load("status.txt");
stop();
}

The Generate Button Script:


Code:
on (rollOver) {
    gen_button.gotoAndPlay(2);
}

on (rollOut) {
    
    gen_button.gotoAndPlay(5);
}


onFrame (3) {
    stop();
}
onFrame (7) {
    stop();
}




on (release) {
_root.gotoAndPlay(1);


Please can someone help me out in how to make this in flash cs6? I don't want to much worry about the generate button, for now, I'm only trying to get the random text loaded...

Thanks.
-Qfunk..