Soumettre la recherche
Mettre en ligne
Sbaw091117
•
Télécharger en tant que KEY, PDF
•
0 j'aime
•
856 vues
Atsushi Tadokoro
Suivre
Signaler
Partager
Signaler
Partager
1 sur 52
Télécharger maintenant
Recommandé
MVI - Managing State The Kotlin Way
MVI - Managing State The Kotlin Way
Zeyad Gasser
package org dev
package org dev
jaya lakshmi
iOS. EventKit Framework. Work with calendars and reminders
iOS. EventKit Framework. Work with calendars and reminders
Voityuk Alexander
KODE JS POKENNNNN
KODE JS POKENNNNN
Pipo Atem
描画とビジネスをクリーンに分ける(公開用)
描画とビジネスをクリーンに分ける(公開用)
Kenji Tanaka
Go Beast Mode with Realtime Reactive Interfaces in Angular 2 and Firebase
Go Beast Mode with Realtime Reactive Interfaces in Angular 2 and Firebase
Lukas Ruebbelke
A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014
Matthias Noback
YQL Tutorial
YQL Tutorial
Tom Croucher
Recommandé
MVI - Managing State The Kotlin Way
MVI - Managing State The Kotlin Way
Zeyad Gasser
package org dev
package org dev
jaya lakshmi
iOS. EventKit Framework. Work with calendars and reminders
iOS. EventKit Framework. Work with calendars and reminders
Voityuk Alexander
KODE JS POKENNNNN
KODE JS POKENNNNN
Pipo Atem
描画とビジネスをクリーンに分ける(公開用)
描画とビジネスをクリーンに分ける(公開用)
Kenji Tanaka
Go Beast Mode with Realtime Reactive Interfaces in Angular 2 and Firebase
Go Beast Mode with Realtime Reactive Interfaces in Angular 2 and Firebase
Lukas Ruebbelke
A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014
Matthias Noback
YQL Tutorial
YQL Tutorial
Tom Croucher
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
DroidConTLV
Automated%20testing%20with%20Espresso2.x
Automated%20testing%20with%20Espresso2.x
Tatsuya Maki
Writing Maintainable JavaScript
Writing Maintainable JavaScript
Andrew Dupont
Blending Culture in Twitter Client
Blending Culture in Twitter Client
Kenji Tanaka
Quick Intro to Android Development
Quick Intro to Android Development
Jussi Pohjolainen
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript Events
Peter-Paul Koch
Cyclejs introduction
Cyclejs introduction
Arye Lukashevski
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
Kenji Tanaka
節子、それViewControllerやない...、FatViewControllerや...。
節子、それViewControllerやない...、FatViewControllerや...。
Kenji Tanaka
The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210
Mahmoud Samir Fayed
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
Matthias Noback
Awesome State Management for React and Other Virtual-Dom Libraries
Awesome State Management for React and Other Virtual-Dom Libraries
FITC
The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202
Mahmoud Samir Fayed
C# Delegates, Events, Lambda
C# Delegates, Events, Lambda
Jussi Pohjolainen
Data20161007
Data20161007
capegmail
Prototype UI
Prototype UI
Sébastien Gruhier
jQuery: Events, Animation, Ajax
jQuery: Events, Animation, Ajax
Constantin Titarenko
I os 15
I os 15
信嘉 陳
Events
Events
Josh Guo
Android Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation Drawer
Agus Haryanto
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGL
gerbille
CQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony application
Samuel ROZE
Contenu connexe
Tendances
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
DroidConTLV
Automated%20testing%20with%20Espresso2.x
Automated%20testing%20with%20Espresso2.x
Tatsuya Maki
Writing Maintainable JavaScript
Writing Maintainable JavaScript
Andrew Dupont
Blending Culture in Twitter Client
Blending Culture in Twitter Client
Kenji Tanaka
Quick Intro to Android Development
Quick Intro to Android Development
Jussi Pohjolainen
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript Events
Peter-Paul Koch
Cyclejs introduction
Cyclejs introduction
Arye Lukashevski
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
Kenji Tanaka
節子、それViewControllerやない...、FatViewControllerや...。
節子、それViewControllerやない...、FatViewControllerや...。
Kenji Tanaka
The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210
Mahmoud Samir Fayed
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
Matthias Noback
Awesome State Management for React and Other Virtual-Dom Libraries
Awesome State Management for React and Other Virtual-Dom Libraries
FITC
The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202
Mahmoud Samir Fayed
C# Delegates, Events, Lambda
C# Delegates, Events, Lambda
Jussi Pohjolainen
Data20161007
Data20161007
capegmail
Prototype UI
Prototype UI
Sébastien Gruhier
jQuery: Events, Animation, Ajax
jQuery: Events, Animation, Ajax
Constantin Titarenko
I os 15
I os 15
信嘉 陳
Events
Events
Josh Guo
Android Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation Drawer
Agus Haryanto
Tendances
(20)
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
Automated%20testing%20with%20Espresso2.x
Automated%20testing%20with%20Espresso2.x
Writing Maintainable JavaScript
Writing Maintainable JavaScript
Blending Culture in Twitter Client
Blending Culture in Twitter Client
Quick Intro to Android Development
Quick Intro to Android Development
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript Events
Cyclejs introduction
Cyclejs introduction
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
VC「もしかして...」Model「私たち...」「「入れ替わってるー!?」」を前前前世から防ぐ方法
節子、それViewControllerやない...、FatViewControllerや...。
節子、それViewControllerやない...、FatViewControllerや...。
The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
Awesome State Management for React and Other Virtual-Dom Libraries
Awesome State Management for React and Other Virtual-Dom Libraries
The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202
C# Delegates, Events, Lambda
C# Delegates, Events, Lambda
Data20161007
Data20161007
Prototype UI
Prototype UI
jQuery: Events, Animation, Ajax
jQuery: Events, Animation, Ajax
I os 15
I os 15
Events
Events
Android Sliding Menu dengan Navigation Drawer
Android Sliding Menu dengan Navigation Drawer
Similaire à Sbaw091117
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGL
gerbille
CQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony application
Samuel ROZE
Java awt
Java awt
GaneshKumarKanthiah
Introduction to CQRS and Event Sourcing
Introduction to CQRS and Event Sourcing
Samuel 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.pdf
JUSTSTYLISH3B2MOHALI
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.pdf
feelinggifts
google play service 7.8 & new tech in M
google play service 7.8 & new tech in M
Ted Liang
Signalsで Event処理を簡単に
Signalsで Event処理を簡単に
Hiroaki Okubo
2011 07-hiyoko
2011 07-hiyoko
Hiroaki Okubo
Android Animation (in tamil)
Android Animation (in tamil)
Dr. Ramkumar Lakshminarayanan
Sbaw091110
Sbaw091110
Atsushi Tadokoro
662305 11
662305 11
Nitigan Nakjuatong
#JavaFX.forReal()
#JavaFX.forReal()
Thierry Wasylczenko
JavaScript APIs - The Web is the Platform - MDN Hack Day, Sao Paulo
JavaScript APIs - The Web is the Platform - MDN Hack Day, Sao Paulo
Robert Nyman
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web - at Nackademin
Robert Nyman
JavaScript APIs - The Web is the Platform - MDN Hack Day, Santiago, Chile
JavaScript APIs - The Web is the Platform - MDN Hack Day, Santiago, Chile
Robert Nyman
JavaScript APIs - The Web is the Platform - MozCamp, Buenos Aires
JavaScript APIs - The Web is the Platform - MozCamp, Buenos Aires
Robert Nyman
Package org dev
Package org dev
jaya lakshmi
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.pdf
anjandavid
JavaScript APIs - The Web is the Platform - MDN Hack Day, Montevideo
JavaScript APIs - The Web is the Platform - MDN Hack Day, Montevideo
Robert Nyman
Similaire à Sbaw091117
(20)
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGL
CQRS and Event Sourcing in a Symfony application
CQRS and Event Sourcing in a Symfony application
Java awt
Java awt
Introduction 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.pdf
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.pdf
google play service 7.8 & new tech in M
google play service 7.8 & new tech in M
Signalsで Event処理を簡単に
Signalsで Event処理を簡単に
2011 07-hiyoko
2011 07-hiyoko
Android Animation (in tamil)
Android Animation (in tamil)
Sbaw091110
Sbaw091110
662305 11
662305 11
#JavaFX.forReal()
#JavaFX.forReal()
JavaScript APIs - The Web is the Platform - MDN Hack Day, Sao Paulo
JavaScript APIs - The Web is the Platform - MDN Hack Day, Sao Paulo
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web - at Nackademin
JavaScript APIs - The Web is the Platform - MDN Hack Day, Santiago, Chile
JavaScript APIs - The Web is the Platform - MDN Hack Day, Santiago, Chile
JavaScript APIs - The Web is the Platform - MozCamp, Buenos Aires
JavaScript APIs - The Web is the Platform - MozCamp, Buenos Aires
Package org dev
Package org dev
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.pdf
JavaScript APIs - The Web is the Platform - MDN Hack Day, Montevideo
JavaScript APIs - The Web is the Platform - MDN Hack Day, Montevideo
Plus de Atsushi Tadokoro
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
Atsushi Tadokoro
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめよう
Atsushi Tadokoro
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2
Atsushi Tadokoro
coma Creators session vol.2
coma Creators session vol.2
Atsushi Tadokoro
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1
Atsushi Tadokoro
Interactive Music II Processingによるアニメーション
Interactive Music II Processingによるアニメーション
Atsushi Tadokoro
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の連携
Atsushi Tadokoro
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)
Atsushi Tadokoro
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
Atsushi Tadokoro
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
Atsushi Tadokoro
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
Atsushi Tadokoro
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Atsushi Tadokoro
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
Atsushi Tadokoro
Tamabi media131118
Tamabi media131118
Atsushi Tadokoro
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 - ライブコーディング 1
Atsushi Tadokoro
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
Atsushi Tadokoro
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替え
Atsushi Tadokoro
Plus de Atsushi Tadokoro
(20)
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめよう
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2
coma Creators session vol.2
coma Creators session vol.2
Interactive 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 SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
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)
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
Tamabi media131118
Tamabi media131118
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替え
Sbaw091117
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
package {
import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.MouseEvent; public class SwcTest extends Sprite { private var _test:SwcClassTest = new SwcClassTest; public function SwcTest() { // stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; // _test.x = stage.stageWidth/2; _test.y = stage.stageHeight/2; this.addChild(_test); // _test.circle.buttonMode = true; _test.rect.buttonMode = true; // _test.circle.addEventListener(MouseEvent.CLICK,clickCircleHandler); _test.rect.addEventListener(MouseEvent.CLICK, clickRectHandler); }
12.
//Circle
private function clickCircleHandler(event:MouseEvent):void { // _test.message.text = "Circle"; } //Rect private function clickRectHandler(event:MouseEvent):void { // _test.message.text = "Rect"; } } }
13.
14.
15.
16.
17.
18.
19.
package {
import fl.events.SliderEvent; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; [SWF(backgroundColor="#FFFFFF", frameRate="60")] public class GuiComponent extends Sprite { private var spin:Spin = new Spin(); private var ui:UserInterface = new UserInterface(); private var rotateSpeed:Number = 0; public function GuiComponent() { // stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; //Spin this.addChild(spin); spin.x = stage.stageWidth/2; spin.y = stage.stageHeight/2; this.addEventListener(Event.ENTER_FRAME, update);
20.
//UserIntaface
this.addChild(ui); ui.x = 20; ui.y = 20; // ui.speedSlider.minimum = 0; ui.speedSlider.maximum = 100; ui.speedSlider.liveDragging = true; ui.radiusSlider.minimum = 0; ui.radiusSlider.maximum = 100; ui.radiusSlider.value = 10; ui.radiusSlider.liveDragging =true; ui.alphaSlider.minimum = 0; ui.alphaSlider.maximum = 100; ui.alphaSlider.value = 100; ui.alphaSlider.liveDragging = true; //UserInterface ui.speedSlider.addEventListener (SliderEvent.CHANGE, speedSliderChangeHanlder); ui.radiusSlider.addEventListener (SliderEvent.CHANGE, radiusSliderChangeHanlder); ui.alphaSlider.addEventListener (SliderEvent.CHANGE, alphaSliderChangeHanlder); }
21.
//
// private function update(event:Event):void { spin.rotation += rotateSpeed; } //Speed private function speedSliderChangeHanlder(event:SliderEvent):void { rotateSpeed = ui.speedSlider.value; } //Radius private function radiusSliderChangeHanlder(event:SliderEvent):void { spin.scaleX = spin.scaleY = ui.radiusSlider.value / 10.0; } //Alpha private function alphaSliderChangeHanlder(event:SliderEvent):void { spin.alpha = ui.alphaSlider.value / 100; } } }
22.
23.
24.
25.
package { import
flash.display.*; [SWF(backgroundColor="#000000", frameRate="30")] public class DrawParticle extends Sprite { public function DrawParticle() { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; //200 for(var i:uint = 0; i < 200; i++){ // Circle var myParticle:Particle = new Particle(); addChild(myParticle); // } } } }
26.
package { import
flash.display.Sprite; import flash.events.Event; public class Particle extends Sprite { private var _speedX:Number; private var _speedY:Number; private var _scale:Number; public function Particle() { super(); _speedX = rand(-8,8); _speedY = rand(-8,8); _scale = rand(0.1, 1.0); var cp:CircleParticle = new CircleParticle; cp.scaleX = cp.scaleY = _scale; cp.cacheAsBitmap = true; this.addChild(cp); this.addEventListener(Event.ENTER_FRAME, update); this.addEventListener(Event.ADDED_TO_STAGE, addedHandler); } private function addedHandler(event:Event):void { x = Math.random() * stage.stageWidth; y = Math.random() * stage.stageHeight;
27.
private function update(event:Event):void
{ limit(); x += _speedX; y += _speedY; } // private function limit():void { if(x < 0 || x > stage.stageWidth){ _speedX *= -1; } if(y < 0 || y > stage.stageHeight){ _speedY *= -1; } } // private function rand(min:Number, max:Number):Number { var randValue:Number = Math.random() * (max - min) + min; return randValue; } } }
28.
29.
• Tween • Tween
• 2 • • Flash Tween • TweenMax • • • http://blog.greensock.com/tweenmaxas3/ • gs
30.
• TweenMax • TweeMax
import gs.TweenMax; import gs.easing.*; • Tween Tween TweenMax.to( , ,{ });
31.
•
• TweenMaxAS3_Basics.swf
32.
33.
package { import
flash.display.*; [SWF(backgroundColor="#000000", frameRate="30")] public class TweenParticle extends Sprite { public function TweenParticle() { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; //200 for(var i:uint = 0; i < 200; i++){ // Circle var myParticle:Particle = new Particle(); addChild(myParticle); // } } } }
34.
package { import
com.greensock.TweenMax; import com.greensock.easing.*; import flash.display.Sprite; import flash.events.Event; public class Particle extends Sprite { private var _speedX:Number; private var _speedY:Number; private var _scale:Number; public function Particle() { super(); _speedX = rand(-8,8); _speedY = rand(-8,8); _scale = rand(0.2, 1.0); var cp:CircleParticle = new CircleParticle; cp.scaleX = cp.scaleY = _scale; cp.cacheAsBitmap = true; this.addChild(cp); this.addEventListener(Event.ADDED_TO_STAGE, addedHandler); }
35.
private function tweenMe():void
{ // var toX:Number = rand(0, stage.stageWidth); var toY:Number = rand(0, stage.stageHeight); //Tween TweenMax.to(this, rand(2,3), {x:toX, y:toY, ease:Sine.easeInOut, onComplete:tweenMe}); } private function addedHandler(event:Event):void { x = Math.random() * stage.stageWidth; y = Math.random() * stage.stageHeight; TweenMax.to(this, 0, {delay:rand(0,4),onComplete:tweenMe}); } private function update(event:Event):void { limit(); x += _speedX; y += _speedY; }
36.
//
private function limit():void { if(x < 0 || x > stage.stageWidth){ _speedX *= -1; } if(y < 0 || y > stage.stageHeight){ _speedY *= -1; } } // private function rand(min:Number, max:Number):Number { var randValue:Number = Math.random() * (max - min) + min; return randValue; } } }
37.
38.
39.
40.
41.
42.
43.
44.
45.
package { import
flash.display.*; import flash.events.Event; import flash.events.MouseEvent; [SWF(backgroundColor="#CCCCCC", frameRate="30")] public class Portfolio extends Sprite { private var _background:BackgroundImage = new BackgroundImage; private var _menu:Menu = new Menu; private var _top:Top; private var _bio:Biography; private var _works:Works; public function Portfolio() { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; this.addEventListener(Event.ADDED_TO_STAGE, addedHandler); // this.addChild(_background); //Menu _menu.x = 20; _menu.y = 20; this.addChild(_menu);
46.
//Menu
_menu.menu1.buttonMode = true; _menu.menu2.buttonMode = true; _menu.menu3.buttonMode = true; _menu.menu1.gotoAndStop(1); _menu.menu2.gotoAndStop(1); _menu.menu3.gotoAndStop(1); // _menu.menu1.addEventListener(MouseEvent.ROLL_OVER,menuRollOverHandler); _menu.menu1.addEventListener(MouseEvent.ROLL_OUT,menuRollOutHandler); _menu.menu1.addEventListener(MouseEvent.CLICK, menu1ClickHandler); _menu.menu2.addEventListener(MouseEvent.ROLL_OVER,menuRollOverHandler); _menu.menu2.addEventListener(MouseEvent.ROLL_OUT,menuRollOutHandler); _menu.menu2.addEventListener(MouseEvent.CLICK, menu2ClickHandler); _menu.menu3.addEventListener(MouseEvent.ROLL_OVER,menuRollOverHandler); _menu.menu3.addEventListener(MouseEvent.ROLL_OUT,menuRollOutHandler); _menu.menu3.addEventListener(MouseEvent.CLICK, menu3ClickHandler); //Top _top = new Top(this); this.addChild(_top); } public function get menu():Menu { return _menu; }
47.
private function addedHandler(event:Event):void
{ _background.width = stage.stageWidth; _background.height = stage.stageHeight; stage.addEventListener(Event.RESIZE, reseizeHandler); } private function reseizeHandler(event:Event):void { _background.width = stage.stageWidth; _background.height = stage.stageHeight; } private function menuRollOverHandler(event:MouseEvent):void { event.target.gotoAndStop(2); } private function menuRollOutHandler(event:MouseEvent):void { event.target.gotoAndStop(1); } private function menu1ClickHandler(event:MouseEvent):void { this.removeChildAt(2); //Top _top = new Top(this); this.addChild(_top); }
48.
private function menu2ClickHandler(event:MouseEvent):void
{ this.removeChildAt(2); //Bio _bio = new Biography(this); this.addChild(_bio); } private function menu3ClickHandler(event:MouseEvent):void { this.removeChildAt(2); //Works _works = new Works(this); this.addChild(_works); } } }
49.
package { import
com.greensock.TweenMax; import com.greensock.easing.*; import flash.display.Sprite; import flash.events.Event; public class Top extends Sprite { private var _main:Portfolio; public function Top(main:Portfolio) { super(); _main = main; var _content:TopMc = new TopMc; this.alpha = 0; this.addChild(_content); this.addEventListener(Event.ADDED_TO_STAGE, addedHandler); } private function addedHandler(event:Event):void { this.x = 140; this.y = 100; TweenMax.to(this, 1, {y:20, alpha:1, delay:1, ease:Quint.easeOut}); } }
50.
package { import
com.greensock.TweenMax; import com.greensock.easing.*; import flash.display.Sprite; import flash.events.Event; public class Biography extends Sprite { private var _main:Portfolio; public function Biography(main:Portfolio) { super(); _main = main; var _content:BiographyMc = new BiographyMc; this.addChild(_content); this.addEventListener(Event.ADDED_TO_STAGE, addedHandler); this.alpha=0; } private function addedHandler(event:Event):void { this.x = 140; this.y = 100; TweenMax.to(this, 1, {y:20, alpha:1, delay:1, ease:Quint.easeOut}); } }
51.
package { import
com.greensock.TweenMax; import com.greensock.easing.*; import flash.display.Sprite; import flash.events.Event; public class Works extends Sprite { private var _main:Portfolio; public function Works(main:Portfolio) { super(); _main = main; var _content:WorksMc = new WorksMc; this.addChild(_content); this.addEventListener(Event.ADDED_TO_STAGE, addedHandler); this.alpha = 0; } private function addedHandler(event:Event):void { this.x = 140; this.y = 100; TweenMax.to(this, 1, {y:20, alpha:1, delay:1, ease:Quint.easeOut}); } }
Télécharger maintenant