flash on 2013-4-1
♥0 |
Line 27 |
Modified 2013-04-01 16:48:46 |
MIT License
archived:2017-03-30 02:48:26
ActionScript3 source code
/**
* Copyright tepe ( http://wonderfl.net/user/tepe )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/7kTu
*/
package {
import flash.display.Sprite;
import flash.text.*;
public class FlashTest extends Sprite {
private var tf:TextField = new TextField();
public function FlashTest() {
// write as3 code here..
addChild(tf);
tf.height =400;
tf.width =300;
tf.text = "";
setLevelUP();
}
private function setLevelUP(maxLevel:int=99):Array{
var n:Number = 50;
var n2:Number = n/4;
var expList:Array = new Array();
for(var i:int=1;i<maxLevel;i++){
expList.push(n);
n2 = i*75-(i-1)*3;
n += Math.floor(n2);
tf.appendText(i.toString()+" : "+(expList[i-1]-expList[i-2]).toString()+" ");
tf.appendText(i.toString()+" : "+expList[i-1].toString()+"\n");
}
return expList;
}
}
}