Sbaw091110
Upcoming SlideShare
Loading in...5
×
 

Sbaw091110

on

  • 1,373 views

 

Statistics

Views

Total Views
1,373
Views on SlideShare
1,183
Embed Views
190

Actions

Likes
0
Downloads
5
Comments
0

2 Embeds 190

http://yoppa.org 189
http://s.deeeki.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Sbaw091110 Sbaw091110 Presentation Transcript

  • 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); // } } } }