Advertisement
Advertisement
| 06.10.2008 at 02:07PM PDT, ID: 23473902 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: |
var tTimer:Timer = new Timer(50, 1); // adding a new timer that will trigger ONCE
tTimer.addEventListener("timer", positionText); // Adding a listener, that will trigger after the estimated time (50ms)
tTimer.start(); // initialising the timer
function positionText(event:TimerEvent):void {
for(var i:int = 0; i < _totalDistractors ; i++) {
//*******
var taradioButtoni:TextField = new TextField();
taradioButtoni.multiline = true;
taradioButtoni.wordWrap= true ;
taradioButtoni.text = answerChoices[i];
taradioButtoni.width = 380;
taradioButtoni.x = 60;
taradioButtoni.y = answerY + i*(taradioButtoni.textHeight + 40);
trace("y " + taradioButtoni.y);
addChild(taradioButtoni);
}
}
|