ho trovato questo script per fare lo scrolling orizzontale di un testo, e ora vorrei far si che il testo venga preso da un file di testo esterno e nel primo frame ho messo:

loadVariables("slogan.txt", "");
nel file txt la variabile si chiama testo e richiamandola da un normale box di testo dinamico funzione.

nello script seguente invece la variabile che contiene il testo si chiama n e come potete vedere io ho provato a mettere n=_root.testo ma non funz.

mi potete aiutare?
grazie


codice:
onClipEvent (load) {
	
	timedate = new Date();
	currenttime = 0;
	// time for the delay of the ticker letters
	// 1 is very fast, 10 is very slow
	timeleftset = 2;
	delay == 1;
	score = 1;
	// initializes ticker line
	settickerobject = function () {
	j = 1;
	i = 1;
	p = "                               ";
	s = p+n;
	l = length(s);
}
	
n = "Welcome to the dynamic news ticker tape.";
        
       n = _root.testo; // questo l'ho messo io
        
        settickerobject();
}
onClipEvent (enterFrame) {
	currenttime = seconds;
	seconds = timedate.getMilliseconds();
	// if (length(seconds) == 1) {
	// seconds = "0"+seconds;
	// }
	// sets up the strings to tick
	// 
	delete timedate;
	timedate = new Date();
	testtime = currenttime-seconds;
	if (testtime != 0) {
		timeleft = timeleft-2;
		score = timeleft;
		delay = 1;
	}
	if (timeleft<=0) {
		timeleft = timeleftset;
		delay = 0;
		..:t = s.substr(i, l,40)
		//other ways to do this string effect
		//..:t = substring(s, i, l);
		//..:t = substring(n, i, l)
		// continues the string, or resets it using the function
		if (Number(i)<=Number(l)) {
			i = Number(i)+1;
		} else {
			settickerobject();
		}

	}
}
codice:
loadVariables("slogan.txt", "");