SlideShare a Scribd company logo
1 of 45
package                   {
    import
    [SWF                          ]
    public class                  extends Sprite {
        //
        public var        :            ;
        //
        private var           :            ;
        //
        public function                () {
             //
        }
        //
        public function                        (   1,   2,   3):   {
             //
        }
        //
        public function                        (   1,   2,   3):   {
             //
        }
    }
}
package {
  import flash.display.*;
  import flash.text.TextField;
  [SWF(backgroundColor="#CCCCCC", frameRate="30")]
  public class hoo extends Sprite {
    //--------------------------------------
    // CLASS CONSTANTS
    //--------------------------------------

        //--------------------------------------
        // CONSTRUCTOR
        //--------------------------------------

        //--------------------------------------
        // PRIVATE VARIABLES
        //--------------------------------------

        //--------------------------------------
        // GETTER/SETTERS
        //--------------------------------------

        //--------------------------------------
        // PUBLIC METHODS
        //--------------------------------------

        //--------------------------------------
        // EVENT HANDLERS
        //--------------------------------------

        //--------------------------------------
        // PRIVATE & PROTECTED INSTANCE METHODS
        //--------------------------------------
    }
}
package {
  import flash.display.*;
  import flash.text.TextField;
  [SWF(backgroundColor="#CCCCCC", frameRate="30")]
  public class hoo extends Sprite {
    //--------------------------------------
    // CLASS CONSTANTS
    //--------------------------------------

        //--------------------------------------
        // CONSTRUCTOR
        //--------------------------------------

        //--------------------------------------
        // PRIVATE VARIABLES
        //--------------------------------------

        //--------------------------------------
        // GETTER/SETTERS
        //--------------------------------------

        //--------------------------------------
        // PUBLIC METHODS
        //--------------------------------------

        //--------------------------------------
        // EVENT HANDLERS
        //--------------------------------------

        //--------------------------------------
        // PRIVATE & PROTECTED INSTANCE METHODS
        //--------------------------------------
    }
}
package {
  import flash.display.*;
  import flash.text.TextField;
  [SWF(backgroundColor="#CCCCCC", frameRate="30")]
  public class hoo extends Sprite {
    //--------------------------------------
    // CLASS CONSTANTS
    //--------------------------------------

        //--------------------------------------
        // CONSTRUCTOR
        //--------------------------------------

        //--------------------------------------
        // PRIVATE VARIABLES
        //--------------------------------------

        //--------------------------------------
        // GETTER/SETTERS
        //--------------------------------------

        //--------------------------------------
        // PUBLIC METHODS
        //--------------------------------------

        //--------------------------------------
        // EVENT HANDLERS
        //--------------------------------------

        //--------------------------------------
        // PRIVATE & PROTECTED INSTANCE METHODS
        //--------------------------------------
    }
}
private var       :




public var    :
//                             (           )
private var _num:Number; //        (   )
private var _intNum:int; //
private var _uintNum:uint; //
private var _name:String; //
private var _mc:MovieClip; //
private var _sp:Sprite; //
private var _text:TextField; //
private var _myArray:Array; //
private function       (    ):




public function    (       ):
//
private function addNumbers(numA:Number, numB:Number):Number
{

 var answer:Number = numA + numB;

 return answer;
}
internal

private


protected


public
package {

  import flash.display.Sprite;


  public class DrawCircle extends Sprite

  {

  
      public function DrawCircle()

  
      {

  
      }

  }
}
package {
  import flash.display.*;
  public class DrawCircle extends Sprite {
    public function DrawCircle()
    {
       //
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;

            var circle:Sprite = new Sprite; //                    circle
            circle.graphics.beginFill(0x3399FF); //
            //
            circle.x = stage.stageWidth/2; //X        (       )
            circle.y = stage.stageHeight/2; //Y           (       )
            circle.graphics.drawCircle(0,0,100);
            addChild(circle); //
        }
    }
}
Stage




circleA           circleB
package {

   import flash.display.*;

   public class DrawCircle3 extends Sprite {

   
      public function DrawCircle3()

   
      {

   
      
     //

   
      
     stage.align = StageAlign.TOP_LEFT;

   
      
     stage.scaleMode = StageScaleMode.NO_SCALE;

   
      
     // A

   
      
     var circleA:Sprite = new Sprite;

   
      
     circleA.x = stage.stageWidth/2 - 50;

   
      
     circleA.y = stage.stageHeight/2 - 50;

   
      
     circleA.graphics.beginFill(0x3399FF);

   
      
     circleA.graphics.drawCircle(0, 0, 100);

   
      
     addChild(circleA);

   
      
     // B

   
      
     var circleB:Sprite = new Sprite;

   
      
     circleB.x = stage.stageWidth/2 + 50;

   
      
     circleB.y = stage.stageHeight/2 + 50;

   
      
     circleB.graphics.beginFill(0xFF9933);

   
      
     circleB.graphics.drawCircle(0, 0, 100);

   
      
     addChild(circleB);

   
      }

   }
}
Stage



circleA



circleB
package {
  import flash.display.*;
  public class DrawCircle4 extends Sprite
  {
    public function DrawCircle4()
    {
       //
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            //1000
            for(var i:int=0; i<1000; i++){
               var circle:Sprite = new Sprite;
               //
                circle.graphics.beginFill(Math.random()*0xFFFFFF);
                circle.x = Math.random()*stage.stageWidth; //X
                circle.y = Math.random()*stage.stageHeight; //Y
                circle.alpha = 0.3; //       30%
                circle.graphics.drawCircle(0,0,Math.random()*40);
                addChild(circle); //
            }
        }
    }
}
package {
  import flash.display.*;
  public class DrawCircle5 extends Sprite
  {
    public function DrawCircle5()
    {
       //
            stage.align = StageAlign.TOP_LEFT;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            //5000
            for(var i:int=0; i<5000; i++){
               var circle:Sprite = new Sprite;
               circle.x = Math.random()*stage.stageWidth;
               circle.y = Math.random()*stage.stageHeight;
               //
                var xdiff:Number = (stage.stageWidth/2-circle.x);
                var ydiff:Number = (stage.stageHeight/2-circle.y);
                var diff:Number = Math.sqrt(xdiff*xdiff + ydiff*ydiff);
                if(diff < 200){ //
                   circle.graphics.beginFill(0xFF9933);
                } else {
                   circle.graphics.beginFill(0x3399FF);
                }
                circle.alpha = 0.3; //         30%
                circle.graphics.drawCircle(0,0,Math.random()*10);
                addChild(circle); //
            }
        }
    }
}
Sbaw091110

More Related Content

Similar to Sbaw091110

I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdffeelinggifts
 
This is Java,I am currently stumped on how to add a scoreboard for.pdf
This is Java,I am currently stumped on how to add a scoreboard for.pdfThis is Java,I am currently stumped on how to add a scoreboard for.pdf
This is Java,I am currently stumped on how to add a scoreboard for.pdfanjandavid
 
Data structuresUsing java language and develop a prot.pdf
Data structuresUsing java language and develop a prot.pdfData structuresUsing java language and develop a prot.pdf
Data structuresUsing java language and develop a prot.pdfarmyshoes
 
Introduction to CQRS and Event Sourcing
Introduction to CQRS and Event SourcingIntroduction to CQRS and Event Sourcing
Introduction to CQRS and Event SourcingSamuel ROZE
 
Please help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdfPlease help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdfJUSTSTYLISH3B2MOHALI
 
3- In the program figurespointers we have a base class location and va.pdf
3- In the program figurespointers we have a base class location and va.pdf3- In the program figurespointers we have a base class location and va.pdf
3- In the program figurespointers we have a base class location and va.pdfatozshoppe
 
شرح مقرر البرمجة 2 لغة جافا - الوحدة التاسعة
شرح مقرر البرمجة 2   لغة جافا - الوحدة التاسعةشرح مقرر البرمجة 2   لغة جافا - الوحدة التاسعة
شرح مقرر البرمجة 2 لغة جافا - الوحدة التاسعةجامعة القدس المفتوحة
 
原创 读《大话设计模式》---外观模式(Facade) 收藏
原创 读《大话设计模式》---外观模式(Facade) 收藏原创 读《大话设计模式》---外观模式(Facade) 收藏
原创 读《大话设计模式》---外观模式(Facade) 收藏wensheng wei
 
Wap to implement bitwise operators
Wap to implement bitwise operatorsWap to implement bitwise operators
Wap to implement bitwise operatorsHarleen Sodhi
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to CodingFabio506452
 
6Modify the bfs.java program (Listing A) to find the minimu.docx
6Modify the bfs.java program (Listing  A) to find the minimu.docx6Modify the bfs.java program (Listing  A) to find the minimu.docx
6Modify the bfs.java program (Listing A) to find the minimu.docxevonnehoggarth79783
 
Design patterns
Design patternsDesign patterns
Design patternsBa Tran
 

Similar to Sbaw091110 (20)

Ssaw08 1021
Ssaw08 1021Ssaw08 1021
Ssaw08 1021
 
Sbaw091117
Sbaw091117Sbaw091117
Sbaw091117
 
I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdf
 
Inheritance.pptx
Inheritance.pptxInheritance.pptx
Inheritance.pptx
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Mini-curso JavaFX Aula2
Mini-curso JavaFX Aula2Mini-curso JavaFX Aula2
Mini-curso JavaFX Aula2
 
This is Java,I am currently stumped on how to add a scoreboard for.pdf
This is Java,I am currently stumped on how to add a scoreboard for.pdfThis is Java,I am currently stumped on how to add a scoreboard for.pdf
This is Java,I am currently stumped on how to add a scoreboard for.pdf
 
C++ L11-Polymorphism
C++ L11-PolymorphismC++ L11-Polymorphism
C++ L11-Polymorphism
 
Data structuresUsing java language and develop a prot.pdf
Data structuresUsing java language and develop a prot.pdfData structuresUsing java language and develop a prot.pdf
Data structuresUsing java language and develop a prot.pdf
 
Introduction to CQRS and Event Sourcing
Introduction to CQRS and Event SourcingIntroduction to CQRS and Event Sourcing
Introduction to CQRS and Event Sourcing
 
Please help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdfPlease help!!I wanted to know how to add a high score to this prog.pdf
Please help!!I wanted to know how to add a high score to this prog.pdf
 
3- In the program figurespointers we have a base class location and va.pdf
3- In the program figurespointers we have a base class location and va.pdf3- In the program figurespointers we have a base class location and va.pdf
3- In the program figurespointers we have a base class location and va.pdf
 
شرح مقرر البرمجة 2 لغة جافا - الوحدة التاسعة
شرح مقرر البرمجة 2   لغة جافا - الوحدة التاسعةشرح مقرر البرمجة 2   لغة جافا - الوحدة التاسعة
شرح مقرر البرمجة 2 لغة جافا - الوحدة التاسعة
 
原创 读《大话设计模式》---外观模式(Facade) 收藏
原创 读《大话设计模式》---外观模式(Facade) 收藏原创 读《大话设计模式》---外观模式(Facade) 收藏
原创 读《大话设计模式》---外观模式(Facade) 收藏
 
Wap to implement bitwise operators
Wap to implement bitwise operatorsWap to implement bitwise operators
Wap to implement bitwise operators
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
6Modify the bfs.java program (Listing A) to find the minimu.docx
6Modify the bfs.java program (Listing  A) to find the minimu.docx6Modify the bfs.java program (Listing  A) to find the minimu.docx
6Modify the bfs.java program (Listing A) to find the minimu.docx
 
7 inheritance
7 inheritance7 inheritance
7 inheritance
 
Design patterns
Design patternsDesign patterns
Design patterns
 
C++ Language
C++ LanguageC++ Language
C++ Language
 

More from Atsushi Tadokoro

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望Atsushi Tadokoro
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようAtsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Atsushi Tadokoro
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2Atsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Atsushi Tadokoro
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションAtsushi Tadokoro
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本Atsushi Tadokoro
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Atsushi Tadokoro
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス Atsushi Tadokoro
 
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Atsushi Tadokoro
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くAtsushi Tadokoro
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリAtsushi Tadokoro
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使うAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Atsushi Tadokoro
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得Atsushi Tadokoro
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Atsushi Tadokoro
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するAtsushi Tadokoro
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えAtsushi Tadokoro
 

More from Atsushi Tadokoro (20)

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめよう
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II Processingによるアニメーション
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
 
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
 
Tamabi media131118
Tamabi media131118Tamabi media131118
Tamabi media131118
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替え
 

Sbaw091110

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. package { import [SWF ] public class extends Sprite { // public var : ; // private var : ; // public function () { // } // public function ( 1, 2, 3): { // } // public function ( 1, 2, 3): { // } } }
  • 14.
  • 15. package { import flash.display.*; import flash.text.TextField; [SWF(backgroundColor="#CCCCCC", frameRate="30")] public class hoo extends Sprite { //-------------------------------------- // CLASS CONSTANTS //-------------------------------------- //-------------------------------------- // CONSTRUCTOR //-------------------------------------- //-------------------------------------- // PRIVATE VARIABLES //-------------------------------------- //-------------------------------------- // GETTER/SETTERS //-------------------------------------- //-------------------------------------- // PUBLIC METHODS //-------------------------------------- //-------------------------------------- // EVENT HANDLERS //-------------------------------------- //-------------------------------------- // PRIVATE & PROTECTED INSTANCE METHODS //-------------------------------------- } }
  • 16. package { import flash.display.*; import flash.text.TextField; [SWF(backgroundColor="#CCCCCC", frameRate="30")] public class hoo extends Sprite { //-------------------------------------- // CLASS CONSTANTS //-------------------------------------- //-------------------------------------- // CONSTRUCTOR //-------------------------------------- //-------------------------------------- // PRIVATE VARIABLES //-------------------------------------- //-------------------------------------- // GETTER/SETTERS //-------------------------------------- //-------------------------------------- // PUBLIC METHODS //-------------------------------------- //-------------------------------------- // EVENT HANDLERS //-------------------------------------- //-------------------------------------- // PRIVATE & PROTECTED INSTANCE METHODS //-------------------------------------- } }
  • 17. package { import flash.display.*; import flash.text.TextField; [SWF(backgroundColor="#CCCCCC", frameRate="30")] public class hoo extends Sprite { //-------------------------------------- // CLASS CONSTANTS //-------------------------------------- //-------------------------------------- // CONSTRUCTOR //-------------------------------------- //-------------------------------------- // PRIVATE VARIABLES //-------------------------------------- //-------------------------------------- // GETTER/SETTERS //-------------------------------------- //-------------------------------------- // PUBLIC METHODS //-------------------------------------- //-------------------------------------- // EVENT HANDLERS //-------------------------------------- //-------------------------------------- // PRIVATE & PROTECTED INSTANCE METHODS //-------------------------------------- } }
  • 18. private var : public var :
  • 19. // ( ) private var _num:Number; // ( ) private var _intNum:int; // private var _uintNum:uint; // private var _name:String; // private var _mc:MovieClip; // private var _sp:Sprite; // private var _text:TextField; // private var _myArray:Array; //
  • 20. private function ( ): public function ( ):
  • 21. // private function addNumbers(numA:Number, numB:Number):Number { var answer:Number = numA + numB; return answer; }
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. package { import flash.display.Sprite; public class DrawCircle extends Sprite { public function DrawCircle() { } } }
  • 28. package { import flash.display.*; public class DrawCircle extends Sprite { public function DrawCircle() { // stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; var circle:Sprite = new Sprite; // circle circle.graphics.beginFill(0x3399FF); // // circle.x = stage.stageWidth/2; //X ( ) circle.y = stage.stageHeight/2; //Y ( ) circle.graphics.drawCircle(0,0,100); addChild(circle); // } } }
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. Stage circleA circleB
  • 36. package { import flash.display.*; public class DrawCircle3 extends Sprite { public function DrawCircle3() { // stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; // A var circleA:Sprite = new Sprite; circleA.x = stage.stageWidth/2 - 50; circleA.y = stage.stageHeight/2 - 50; circleA.graphics.beginFill(0x3399FF); circleA.graphics.drawCircle(0, 0, 100); addChild(circleA); // B var circleB:Sprite = new Sprite; circleB.x = stage.stageWidth/2 + 50; circleB.y = stage.stageHeight/2 + 50; circleB.graphics.beginFill(0xFF9933); circleB.graphics.drawCircle(0, 0, 100); addChild(circleB); } } }
  • 37.
  • 39.
  • 40.
  • 41. package { import flash.display.*; public class DrawCircle4 extends Sprite { public function DrawCircle4() { // stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; //1000 for(var i:int=0; i<1000; i++){ var circle:Sprite = new Sprite; // circle.graphics.beginFill(Math.random()*0xFFFFFF); circle.x = Math.random()*stage.stageWidth; //X circle.y = Math.random()*stage.stageHeight; //Y circle.alpha = 0.3; // 30% circle.graphics.drawCircle(0,0,Math.random()*40); addChild(circle); // } } } }
  • 42.
  • 43.
  • 44. package { import flash.display.*; public class DrawCircle5 extends Sprite { public function DrawCircle5() { // stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; //5000 for(var i:int=0; i<5000; i++){ var circle:Sprite = new Sprite; circle.x = Math.random()*stage.stageWidth; circle.y = Math.random()*stage.stageHeight; // var xdiff:Number = (stage.stageWidth/2-circle.x); var ydiff:Number = (stage.stageHeight/2-circle.y); var diff:Number = Math.sqrt(xdiff*xdiff + ydiff*ydiff); if(diff < 200){ // circle.graphics.beginFill(0xFF9933); } else { circle.graphics.beginFill(0x3399FF); } circle.alpha = 0.3; // 30% circle.graphics.drawCircle(0,0,Math.random()*10); addChild(circle); // } } } }