Dear StackOverflow,
I recently started fiddling around with as3, which look pretty good, problem is I come from as2 and I'm completely lost.
I'm tring to import text from 4 text files then move them on on top of the other:
text1 x = 100, text2 x=150 text3 x=200 etc..
Here is where I'm stuck:
import flash.display.MovieClip;
import flash.display.Loader;
import flash.events.*;
import flash.net.URLRequest;
import caurina.transitions.Tweener;
var myTextLoader:URLLoader = new URLLoader();
var myTextField_txt:TextField = new TextField();
myTextField_txt.wordWrap=true;
myTextField_txt.autoSize=TextFieldAutoSize.CENTER;
var i:int = 0;
var ipsilon:int = 200;
for(i;i<5;i++) {
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
myTextLoader.load(new URLRequest("text"+i+".txt"));
}
function onLoaded(e:Event):void {
var testo = e.target.data;
styleMe(testo);
}
function styleMe(testo){
//Associamo il testo alla variabile
myTextField_txt.text = testo;
//Formato Carattere
var myFormat:TextFormat = new TextFormat();
myFormat.size = 15;
myFormat.align = TextFormatAlign.CENTER;
myTextField_txt.defaultTextFormat = myFormat;
//Formato Varie
myTextField_txt.textColor = 0x000000;
myTextField_txt.border = true;
myTextField_txt.borderColor = 0x999999;
myTextField_txt.width = 200;
myTextField_txt.height = 20;
myTextField_txt.background = true;
myTextField_txt.backgroundColor = 0xFFCC00;
//Posizione
myTextField_txt.x = 0;
myTextField_txt.y = -100;
var text1 = addChild(myTextField_txt);
tweenMe(text1);
}
function tweenMe(text1){
Tweener.addTween(text1, {x:450,y:200, time:5});
}
I can't understand how do I tell actionscript to move them in different position.
Thank you very much for your patience
David