Hi there
With help from Stratification, I’ve sorted out my previous problem, but alas it grew into a more insidious and tedious mire. Especially, I am sure, for people who know what theyre doing: I’m still rather daunted by Actionscript.
SO, I’m trying to load a text file, one.txt, into a dynamic text field. Simple enough, but this time I wanted to have the field rotated to a specific angle, and this requirement defeats my meagre knowledge. I’ve got a rotated dynamic text field, but I can only fill it with text typed into the actionscript (I don’t know the term for this) as opposed to loaded from an external text file.
Strat kindly gave me the following code:
stop();
loadText = new LoadVars();
loadText.onData = function(src:String) {
if(src != undefined){
my_txt.text = src;
}
else{
trace(“Woops, didn’t load”);
}
}
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = “verd”;
this.createTextField(“my_txt”, this.getNextHighestDepth(), 10, 10, 160, 120);
my_txt.wordWrap = true;
my_txt.embedFonts = true;
//If this text is what we see then something didn’t happen correctly.
my_txt.text = “Not Loaded”;
my_txt.setTextFormat(my_fmt);
my_txt._rotation = 45;
//Now that everything is set up, load our text
loadText.load(“one.txt”);
But when I try it, the “Not Loaded” text appears, so something went wrong, and it’s beyond me to see what.
If anybody can offer any help I’d really appreciate it.
Cheers!
N