JAVAC.JP
HOSHI TETSUYA ―“S–ξ
2005/07/25
hossy@javac.jp
http://www.javac.jp
Google
WWW ‚πŒŸυ WWW.JAVAC.JP ‚πŒŸυ

A-1 ‰Ϋ‘θ(1) - ‰π“š

‰Ϋ‘θ(1-1)
main.as
---
var helloWorld:HelloWorld=new HelloWorld();
stop();

HelloWorld.as
---
class HelloWorld{
    function HelloWorld(){
        trace("HelloWorld.");
    }
}
‰Ϋ‘θ(1-2)
main.as
---
var helloWorld:HelloWorld=new HelloWorld();
stop();

HelloWorld.as
---
class HelloWorld{
    function HelloWorld(){
        var n:Number=Math.floor(10*Math.random()+1);
        for(var i:Number=0;i<n;i++){
            trace("HelloWorld.");
        }
    }
}
‰Ϋ‘θ(1-3)
main.as
---
var sum:Number=0;
for(var i:Number=1;i<=1000;i++){
    sum+=i;
}
trace("SUM : "+sum);
stop();



BACKTOPNEXT




All Contents Copyright (C) 2005 HOSHI Tetsuya
Home