flash on 2011-4-14
♥0 |
Line 25 |
Modified 2011-04-14 20:23:18 |
MIT License
archived:2017-03-20 16:55:36
ActionScript3 source code
/**
* Copyright itsDcTurner ( http://wonderfl.net/user/itsDcTurner )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/iT7V
*/
package {
import flash.text.TextField;
import flash.display.Sprite;
public class HappyBirthday extends Sprite {
public function HappyBirthday() {
// write as3 code here..
var t:TextField = new TextField();
t.width = stage.stageWidth;
t.height = stage.stageHeight;
addChild(t);
t.text = singHappyBirthday("Per-son");
}
public function singHappyBirthday($name:String):String{
var s:String = "";
for (var i:int=0; i<4; i++){
s+="Happy Birthday ";
if (i!=2){ s+="to you,\n"; }
else{
s+="dear "+$name+", \n";
}
}
s+=" * (O-O) *";
return s;
}
}
}