Hello there,
On a site I am working on, I get a continual “Transferring data from…” in firefox and narrowed it down to one small part of code that loads an external text file, and uses CSS on it. The code works perfect for what I need… but I am not sure what I am missing to stop the transferring… I would guess its a delete onEnterFrame, but I tried that in many part sof the code and it does not fix it.
stop();
var format = new TextField.StyleSheet();
var path = "styles.css";
var my_lv = new LoadVars();
my_lv.onLoad = function(success) {
if (success) {
content_txt.htmlText = this.content;
if(content_txt.maxscroll < 2){
up_btn._visible = false;
down_btn._visible = false;
}else{
up_btn._visible = true;
down_btn._visible = true;
}
} else {
content_txt.htmlText = "error";
}
my_mc.removeMovieClip();
};
my_lv.load("txt/brokers.txt");
format.load(path);
content_txt.styleSheet = format;
this.createEmptyMovieClip("my_mc", 9876);
my_mc.onEnterFrame = function() {
var loaded = my_lv.getBytesLoaded();
var total = my_lv.getBytesTotal();
var percent = Math.floor(100*loaded/total);
content_txt.htmlText = (loaded>0 ? percent : 0)+"%";
};
[FONT=Courier New]
[/FONT]
I have removed this code from my movie and it does fix the problem, so I know this above is the issue.
Could someone please help fix this code?
Thank you so much for your time!
Dale