flash actionscript:
Hello
I'm using xml to load .txt file in a text fields in specifyly frame
Im plasting this code in all frames with text fields.
And It's work but I notice that when the text file is loading it's some
sort of lag in animation with text .
Is there any change to do some change in first preloader so he load
also text files ? and then bild global display in simple way by call
out a function in the frame with textField on it or something :)
It's late and I'm out of ideas ...
http://lukas-comp.9o.pl/kojot/ - but not yet finish :(
Txt files:
portfolio.txt
about.txt
contact.txt
title_portfolio.txt
And the code in my frame for examle with contact frame is that:
//init TextArea component
contact.html = true;
contact.wordWrap = true;
contact.multiline = true;
contact.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("style.css");
contact.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("contact.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
contact.text = kungFuContent;
}
}
-----------------------------------
//preload
onClipEvent (enterFrame) {
if (_root.getBytesLoaded()<=100) {
_root.status = "loading bytes ..";
} else if (_root.getBytesLoaded()>=_root.getBytesTotal()) {
_root.play();
} else {
_root.status = " FUELING: "+int(_root.getBytesLoaded()/1000)+"
this._xscale = 100/(_root.getBytesTotal()/_root.getBytesLoaded());
}
}
Plese help ...