Ciao a tutti!
Ho una galleria in flash 8 che richiama foto e testo esternamente con un txt.
Il probleme è che il testo è controllato da uno script TextField.prototype.typeWriterx che a me non piace proprio, come faccio a toglielrlo?
Il codice relativo al testo è questo:
codice:
TextField.prototype.typeWriterx = function(str, ms) {
//define variables for referencing to them in functions
var me = this;
var i = 0;
var old_text = me.text;
var old_text_len = old_text.length;
var new_text_len = str.length;
var rand_str = str+"-------______+++++ ";
//this is done to clear not finished interval from previous command.
//usefull on consecutive menu rollovers
if (me.typeWriterx_itv != undefined) {
clearInterval(me.typeWriterx_itv);
me.typeWriterx_itv = undefined;
}
var itv = setInterval(function () {
me.text = str.substring(0, i)+me.typeWriterx_rand(rand_str, (str.length-i));
dec_count = (old_text_len-new_text_len-i*2);
if (dec_count<0) {
dec_count = 0;
} else {
me.text += old_text.substr(i, dec_count);
}
i++;
if (i>str.length and dec_count == 0) {
clearInterval(itv);
me.typeWriterx_itv = undefined;
}
updateAfterEvent();
}, ms);
me.typeWriterx_itv = itv;
};
TextField.prototype.typeWriterx_rand = function(str, num) {
//return rundom letters from string
var r_str = "";
for (i=0; i<num; i++) {
r_str += str.substr(random(str.length), 1);
}
return r_str;
};