CSS Problem

Mirfällt

Mitglied
Hallo,
ich hab mal wieder ein Problem mit Flash. Ich will einen Text aus einer .txt Datei Dynamisch laden, das klappt auch soweit. Nur manchmal wir der geladene Text ohne das "dazu" geladene CSS dargestellt, aber immer nur beim ersten mal laden. Ich hab mal die Funktion "Laden" angehängt. Kann mir einer vielleicht helfen, das Problem zu beheben, also sicher zu stellen, dass der Text immer im richtigen Format dargestellt wird?
Gruß

Code:
Laden = function (obj) {
	var loadvars_lv = new LoadVars();
	loadvars_lv.load("http://localhost/Test/"+obj+".txt");
	var Format_css = new TextField.StyleSheet();
	Format_css.load("http://localhost/Test/"+obj+".css");
	Format_css.onLoad = function(success) {
		Text_txt.styleSheet = Format_css;
	};
	loadvars_lv.onLoad = function(success) {
		if (success) {
			Text_txt.text = this.content;
		}
	};
};
 
Versehe loadvars_lv mit einem onLoad der das css load induziert, und weise onLoad des css text und stylesheet zu ....

B
 
Zurück