actionscript love
- Started
- Last post
- 5 Responses
- airey
hey,
i'm looking for a good tute that explains how i can dynamically load an external txt file and apply an external css file to the text box also showing the coding of the txt file. i realise there are some similar ones out there but they all show the text hard-coded into the actual flash file action layer.
any help hugely appreciated!
- lucyGeneric0
Hey (L) u wanna do summin like below.
Make sure the LoadVars object has onData not onLoad - its a way to circumvent Flash Parsing the data & subsequently trying to typecast it into some URL encoded whoose yer daddy.
////////////////////////////////...
var myLoadOBJ:LoadVars = new LoadVars();
myLoadOBJ.parent = this; // or whtva parent
myLoadOBJ.onData = function(resultset){
this.parent.process_text(results... };
myLoadOBJ.load("myFile.txt");function process_text(textFile){
this.createTextField("myText",0...
myText.styleSheet.load("myStyles...
myText.html = true; myText.wordWrap = true;
myText.htmlText = textFile;
}
- lucyGeneric0
Ooo and heres the supported CSS elements:
- DutchBoy0
good shit, lucyGeneric.
cool nic btw!
- lucyGeneric0
Cheese :)
And yr posts Dutchboy keep me amused during the long day of werk :)
- airey0
thanks for the love peeps! there's one more day i'll make without taking to the bell tower with a sniper rifle...