Hello,
I have a fla file with text box (randomText) and mc (random3) on one frame. The text is being randomly loaded and typed from external text file. This works well.
I simply want to mc to go back and play frame one when text is done typing.
I am going crazy. I think the below should work - all is, except MC is not going back to frame one. (I have used relative/absolute paths but nothing works?)
if you can tell me what is wrong I'll so appreciate it (using flashmx 2004 (7.2) on a mac.

the code:

stop();

var typeSpeed:Number = 75; //ms: 1000ms = 1 sec
var pauseDelay:Number = 1000; //ms: 1000ms = 1 sec
var currentCount:Number = 0;
var animationTimer:Number;
var myFactsArray:Array;

var una = new Array();
var uniqueNums = myFactsArray.length
for (i = 0; i < uniqueNums ; i++) {
theNum = (Random(Number(uniqueNums))+1);
if (una.length == 0) { una[i] = theNum }
else {
for (n = 0; n < una.length ; n++) {
if (theNum == una[n-1]) {
una.pop();
i--;
n = una.length;
} else {
una[i] = theNum

}
}
}
}


var quoteData = new LoadVars();
quoteData.onLoad = function(success) {

if (success) {
myFactsArray = quoteData.microArray.split("|");
//randNum = Math.floor(Math.random() * myFactsArray.length);
animationTimer = setInterval(animateIt, typeSpeed, myFactsArray[una]);
this.random3.gotoAndPlay(1); //PLACING HERE DOES NOT WORK
}
}

quoteData.load("neighbours.txt", _root.randomText.Texts);

function animateIt(targetString) {
if (currentCount < targetString.length) {
Texts.text += targetString.charAt(currentCount);
currentCount++;


} else {

clearInterval(animationTimer);
setTimeout(refreshQuote,pauseDelay);
trace("CLEARED INTERVAL");



}
}
function refreshQuote() {
trace("REFRESH CALLED");
//reset vars
currentCount = 0;
Texts.text = "";
animationTimer = setInterval(animateIt, typeSpeed, myFactsArray[una]);
this.random3.gotoAndPlay(1); //PLACING HERE DOES NOT WORK EITHER


}