Ho un problema con il caricamento di un effetto su un testo.
Il file è "effetto_testo.swf"
Il codice dell'effetto è questo:
Codice PHP:
this.onLoad = function() {
tf = "";
text = "Testo di prova Testo di prova Testo di prova Testo di prova Testo di prova ";
_root.tf_max = text.length;
// Set whatever speed you like! The function below takes care of any problems
//If the speed wacks it out, the tf is set to the text string without error.
// you don't notice anything becuase the text is moving fast anyway.
speed=6;
};
this.onEnterFrame = function() {
if (_root.tf_max<=1) {
// This sets the tf to the text string.
//This is the fix for it wacking out the first words in the
//text becuase of the max length.
output = substring(text, 1);
tf = output;
break;
} else {
tfLength = _root.tf_max-speed;
_root.tf_max = tfLength;
output = substring(text, tfLength, speed);
tf = output+tf;
}
};
MovieClip.prototype.reset = function () {
tf = "";
// Reset the tf_max to allow it to "retype" the text
_root.tf_max = text.length;
}
Il testo viene caricato in un campo di testo dinamico
Dunque, anche se all'inizio del codice inserico:
Codice PHP:
this._lockroot = true;
e provo a caricare il file "effetto_testo.swf" in un contenitore come esterno, come contenuto del campo di testo mi restituisce "undefined"
Dove sbaglio?
Se devo allegare i file ditemelo pure.
Grazie