SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
www.inazumatv.com/contents/

       me.beginsprite.com
2011   7   2
www.sidevision.co.jp

2011   7   2
Signals
               Event

2011   7   2
Flash   Event
               Events




2011   7   2
Event
       Event




       Event
2011   7   2
01 Sample


 start_btn.addEventListener(MouseEvent.CLICK, onStartClicked);
 stop_btn.addEventListener(MouseEvent.CLICK, onStopClicked);

  function onStartClicked (e:MouseEvent):void {
  	 addEventListener(Event.EXIT_FRAME, onLoop);
  }
  function onStopClicked (e:MouseEvent):void {
  	 removeEventListener(Event.EXIT_FRAME, onLoop);
  }
  function onLoop (e:Event):void {
  	 fan_mc.rotation += 5;
  }
2011   7   2
01 Sample




  addEventListener(Event.EXIT_FRAME, onLoop);


               removeEventListener(Event.EXIT_FRAME, onLoop);




2011   7   2
02 Sample

 package com.inazumatv.events
 {
 import flash.events.Event;

 public class FanEvent extends Event
 {
 	   public static const FAN_START:String = "fanStart";
 	   public static const FAN_STOP:String = "fanStop";
 	
 	   public function FanEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
 	   {
 	   	    super(type, bubbles, cancelable);
 	   }
 	
 	   override public function clone():Event
 	   {
 	   	    return new FanEvent(type, bubbles, cancelable);
 	   }
 }
 }


2011   7   2
02 Sample

 package com.inazumatv.events
 {
 import flash.events.Event;

 public class FanEvent extends Event
 {
 	   public static const FAN_START:String = "fanStart";
 	   public static const FAN_STOP:String = "fanStop";
 	
 	   public function FanEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
 	   {
 	   	    super(type, bubbles, cancelable);
 	   }
 	
 	   override public function clone():Event
 	   {
 	   	    return new FanEvent(type, bubbles, cancelable);
 	   }
 }
 }


2011   7   2
03 Sample
 package com.inazumatv.events
 {
 import flash.events.Event;

 public class FanSpeedEvent extends Event
 {
 	
 	    public static const CHANGE_SPEED:String = "changeSpeed";
 	    private var _speed:Number;
 	
 	    public function FanSpeedEvent(speed:Number, type:String, bubbles:Boolean=true, cancelable:Boolean=false)
 	    {
 	    	     _speed = speed;
 	    	     super(type, bubbles, cancelable);
 	    }
 	
 	    override public function clone():Event
 	    {
 	    	     return new FanSpeedEvent(speed, type, bubbles, cancelable);
 	    }
 	
 	    override public function toString():String
 	    {
 	    	     return formatToString("FanSpeedEvent", "speed", "type", "bubbles", "cancelable", "eventPhase")
 	    }
 	
 	    public function get speed():Number
 	    {
 	    	     return _speed;
 	    }
 }
 }
2011   7   2
03 Sample
 package com.inazumatv.events
 {
 import flash.events.Event;

 public class FanSpeedEvent extends Event
 {
 	
 	    public static const CHANGE_SPEED:String = "changeSpeed";
 	    private var _speed:Number;
 	
 	    public function FanSpeedEvent(speed:Number, type:String, bubbles:Boolean=true, cancelable:Boolean=false)
 	    {
 	    	     _speed = speed;
 	    	     super(type, bubbles, cancelable);
 	    }
 	
 	    override public function clone():Event
 	    {
 	    	     return new FanSpeedEvent(speed, type, bubbles, cancelable);
 	    }
 	
 	    override public function toString():String
 	    {
 	    	     return formatToString("FanSpeedEvent", "speed", "type", "bubbles", "cancelable", "eventPhase")
 	    }
 	
 	    public function get speed():Number
 	    {
 	    	     return _speed;
 	    }
 }
 }
2011   7   2
Signals
               Event

2011   7   2
Signals
       addEventListener(listener:Function)
       removeEventListener(listener:Function)
       dispatchEvent(new ExampleEvent(ExampleEvent.EVENT_TYPE))



       add(listener:Function)
       addOnce(listener:Function)
       remove(listener:Function)
       removeAll()
       dispatch(... valueObjects)
2011   7   2
Signals
       add(listener:Function)
       addOnce(listener:Function)
       remove(listener:Function)
       removeAll()
       dispatch(... valueObjects)



       addWithPriority(listener:Function, priority:int=0)	
       addOnceWithPriority(listener:Function, priority:int=0)


2011   7   2
Signals
       if (stage)
       	 init();
       else
       	 new NativeSignal(this,
        	 	 	 Event.ADDED_TO_STAGE,
        	 	 	 Event
       	 ).addOnce(init);



       init

2011   7   2
Signals
   var accelerate:Signal = new Signal(Number);
   accelerate.dispatch(speed);

   function onAccelerate(speed:Number) {
   }
   accelerate.add(onAccelerate);




2011   7   2
Signals
               NativeSignal
               Signal
               DeluxeSignal

                      Class

2011   7   2
Signals
           github : as3-signals
           https://github.com/robertpenner/as3-signals

       Robert Penner
       Programming Macromedia Flash MX

       mx.motion.easing.*
       fl.motion.easing.*



2011   7   2
Signals
   github : as3-signals
   https://github.com/robertpenner/as3-signals/wiki
   https://github.com/robertpenner/as3-signals/wiki/_pages




   http://www.himco.jp/articles.php

   inzumatv.com
   http://www.inazumatv.com/contents/archives/tag/signals




2011   7   2
www.inazumatv.com/contents/
               me.beginsprite.com
               www.sidevision.co.jp



                            @taikiken
2011   7   2

Más contenido relacionado

La actualidad más candente

openFrameworks 007 - events
openFrameworks 007 - eventsopenFrameworks 007 - events
openFrameworks 007 - events
roxlu
 
Ejemplos Interfaces Usuario 3
Ejemplos Interfaces Usuario 3Ejemplos Interfaces Usuario 3
Ejemplos Interfaces Usuario 3
martha leon
 
Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜
Kiyotaka Oku
 

La actualidad más candente (20)

culadora cientifica en java
culadora cientifica en javaculadora cientifica en java
culadora cientifica en java
 
Iniciación rx java
Iniciación rx javaIniciación rx java
Iniciación rx java
 
The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]
 
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
 
A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014A Series of Fortunate Events - Symfony Camp Sweden 2014
A Series of Fortunate Events - Symfony Camp Sweden 2014
 
openFrameworks 007 - events
openFrameworks 007 - eventsopenFrameworks 007 - events
openFrameworks 007 - events
 
Android Wear Essentials
Android Wear EssentialsAndroid Wear Essentials
Android Wear Essentials
 
Android - Intents and Broadcast Receivers
Android - Intents and Broadcast ReceiversAndroid - Intents and Broadcast Receivers
Android - Intents and Broadcast Receivers
 
Ejemplos Interfaces Usuario 3
Ejemplos Interfaces Usuario 3Ejemplos Interfaces Usuario 3
Ejemplos Interfaces Usuario 3
 
Async JavaScript in ES7
Async JavaScript in ES7Async JavaScript in ES7
Async JavaScript in ES7
 
知っておきたいSpring Batch Tips
知っておきたいSpring Batch Tips知っておきたいSpring Batch Tips
知っておきたいSpring Batch Tips
 
Calculon
CalculonCalculon
Calculon
 
Activities
ActivitiesActivities
Activities
 
Androidaop 170105090257
Androidaop 170105090257Androidaop 170105090257
Androidaop 170105090257
 
Applet 2 container and action_listener
Applet 2 container and action_listenerApplet 2 container and action_listener
Applet 2 container and action_listener
 
Reactive computing
Reactive computingReactive computing
Reactive computing
 
The Ring programming language version 1.9 book - Part 91 of 210
The Ring programming language version 1.9 book - Part 91 of 210The Ring programming language version 1.9 book - Part 91 of 210
The Ring programming language version 1.9 book - Part 91 of 210
 
Promises in iOS development
Promises in iOS developmentPromises in iOS development
Promises in iOS development
 
Windows 10 - one application for all platforms. (UA Mobile 2016)
Windows 10 - one application for all platforms. (UA Mobile 2016)Windows 10 - one application for all platforms. (UA Mobile 2016)
Windows 10 - one application for all platforms. (UA Mobile 2016)
 
Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜Griffon不定期便〜G*ワークショップ編〜
Griffon不定期便〜G*ワークショップ編〜
 

Destacado

Being an effective_seo_within_your_or-tony_adam
Being an effective_seo_within_your_or-tony_adamBeing an effective_seo_within_your_or-tony_adam
Being an effective_seo_within_your_or-tony_adam
zachbrowne
 

Destacado (9)

iOSデバイスの対応OSと画面サイズとかCPUとか発売時期とか
iOSデバイスの対応OSと画面サイズとかCPUとか発売時期とかiOSデバイスの対応OSと画面サイズとかCPUとか発売時期とか
iOSデバイスの対応OSと画面サイズとかCPUとか発売時期とか
 
Signalsで Event処理を簡単に
Signalsで Event処理を簡単にSignalsで Event処理を簡単に
Signalsで Event処理を簡単に
 
めんどうな viewport や 端末判別の ために sagen.js
めんどうな viewport や 端末判別の ために sagen.jsめんどうな viewport や 端末判別の ために sagen.js
めんどうな viewport や 端末判別の ために sagen.js
 
HTML5 Video Player #fsync
HTML5 Video Player #fsyncHTML5 Video Player #fsync
HTML5 Video Player #fsync
 
HTML5 Video Player
HTML5 Video PlayerHTML5 Video Player
HTML5 Video Player
 
KickApps SF Summit - "Open Remarks on where we stand in the world of social m...
KickApps SF Summit - "Open Remarks on where we stand in the world of social m...KickApps SF Summit - "Open Remarks on where we stand in the world of social m...
KickApps SF Summit - "Open Remarks on where we stand in the world of social m...
 
DelveNYC: Flash Catalyst
DelveNYC: Flash CatalystDelveNYC: Flash Catalyst
DelveNYC: Flash Catalyst
 
Being an effective_seo_within_your_or-tony_adam
Being an effective_seo_within_your_or-tony_adamBeing an effective_seo_within_your_or-tony_adam
Being an effective_seo_within_your_or-tony_adam
 
KickApps SF Summit - "Dell's thoughts on Social Leadgen", by Heather Bernett
KickApps SF Summit - "Dell's thoughts on Social Leadgen", by Heather BernettKickApps SF Summit - "Dell's thoughts on Social Leadgen", by Heather Bernett
KickApps SF Summit - "Dell's thoughts on Social Leadgen", by Heather Bernett
 

Similar a 2011 07-hiyoko

There is something about Event
There is something about EventThere is something about Event
There is something about Event
Eddie Kao
 
Trisha gee concurrentprogrammingusingthedisruptor
Trisha gee concurrentprogrammingusingthedisruptorTrisha gee concurrentprogrammingusingthedisruptor
Trisha gee concurrentprogrammingusingthedisruptor
EthanTu
 
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloadingRiga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Anton Arhipov
 
Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5
sotlsoc
 

Similar a 2011 07-hiyoko (20)

There is something about Event
There is something about EventThere is something about Event
There is something about Event
 
Asynchronous Programming at Netflix
Asynchronous Programming at NetflixAsynchronous Programming at Netflix
Asynchronous Programming at Netflix
 
Yahoo presentation: JavaScript Events
Yahoo presentation: JavaScript EventsYahoo presentation: JavaScript Events
Yahoo presentation: JavaScript Events
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
activity_and_fragment_may_2020_lakopi
activity_and_fragment_may_2020_lakopiactivity_and_fragment_may_2020_lakopi
activity_and_fragment_may_2020_lakopi
 
The 2016 Android Developer Toolbox [NANTES]
The 2016 Android Developer Toolbox [NANTES]The 2016 Android Developer Toolbox [NANTES]
The 2016 Android Developer Toolbox [NANTES]
 
Testing Android apps based on Dagger and RxJava
Testing Android apps based on Dagger and RxJavaTesting Android apps based on Dagger and RxJava
Testing Android apps based on Dagger and RxJava
 
Trisha gee concurrentprogrammingusingthedisruptor
Trisha gee concurrentprogrammingusingthedisruptorTrisha gee concurrentprogrammingusingthedisruptor
Trisha gee concurrentprogrammingusingthedisruptor
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
event-handling.pptx
event-handling.pptxevent-handling.pptx
event-handling.pptx
 
Decoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DICDecoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DIC
 
Ext J S Observable
Ext J S ObservableExt J S Observable
Ext J S Observable
 
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloadingRiga DevDays 2017 - The hitchhiker’s guide to Java class reloading
Riga DevDays 2017 - The hitchhiker’s guide to Java class reloading
 
662305 11
662305 11662305 11
662305 11
 
Chapter 11.5
Chapter 11.5Chapter 11.5
Chapter 11.5
 
The Ring programming language version 1.7 book - Part 16 of 196
The Ring programming language version 1.7 book - Part 16 of 196The Ring programming language version 1.7 book - Part 16 of 196
The Ring programming language version 1.7 book - Part 16 of 196
 
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingJavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
 
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloadingJavaOne 2017 - The hitchhiker’s guide to Java class reloading
JavaOne 2017 - The hitchhiker’s guide to Java class reloading
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handling
 
The Ring programming language version 1.6 book - Part 15 of 189
The Ring programming language version 1.6 book - Part 15 of 189The Ring programming language version 1.6 book - Part 15 of 189
The Ring programming language version 1.6 book - Part 15 of 189
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

2011 07-hiyoko

  • 1. www.inazumatv.com/contents/ me.beginsprite.com 2011 7 2
  • 3. Signals Event 2011 7 2
  • 4. Flash Event Events 2011 7 2
  • 5. Event Event Event 2011 7 2
  • 6. 01 Sample start_btn.addEventListener(MouseEvent.CLICK, onStartClicked); stop_btn.addEventListener(MouseEvent.CLICK, onStopClicked); function onStartClicked (e:MouseEvent):void { addEventListener(Event.EXIT_FRAME, onLoop); } function onStopClicked (e:MouseEvent):void { removeEventListener(Event.EXIT_FRAME, onLoop); } function onLoop (e:Event):void { fan_mc.rotation += 5; } 2011 7 2
  • 7. 01 Sample addEventListener(Event.EXIT_FRAME, onLoop); removeEventListener(Event.EXIT_FRAME, onLoop); 2011 7 2
  • 8. 02 Sample package com.inazumatv.events { import flash.events.Event; public class FanEvent extends Event { public static const FAN_START:String = "fanStart"; public static const FAN_STOP:String = "fanStop"; public function FanEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) { super(type, bubbles, cancelable); } override public function clone():Event { return new FanEvent(type, bubbles, cancelable); } } } 2011 7 2
  • 9. 02 Sample package com.inazumatv.events { import flash.events.Event; public class FanEvent extends Event { public static const FAN_START:String = "fanStart"; public static const FAN_STOP:String = "fanStop"; public function FanEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) { super(type, bubbles, cancelable); } override public function clone():Event { return new FanEvent(type, bubbles, cancelable); } } } 2011 7 2
  • 10. 03 Sample package com.inazumatv.events { import flash.events.Event; public class FanSpeedEvent extends Event { public static const CHANGE_SPEED:String = "changeSpeed"; private var _speed:Number; public function FanSpeedEvent(speed:Number, type:String, bubbles:Boolean=true, cancelable:Boolean=false) { _speed = speed; super(type, bubbles, cancelable); } override public function clone():Event { return new FanSpeedEvent(speed, type, bubbles, cancelable); } override public function toString():String { return formatToString("FanSpeedEvent", "speed", "type", "bubbles", "cancelable", "eventPhase") } public function get speed():Number { return _speed; } } } 2011 7 2
  • 11. 03 Sample package com.inazumatv.events { import flash.events.Event; public class FanSpeedEvent extends Event { public static const CHANGE_SPEED:String = "changeSpeed"; private var _speed:Number; public function FanSpeedEvent(speed:Number, type:String, bubbles:Boolean=true, cancelable:Boolean=false) { _speed = speed; super(type, bubbles, cancelable); } override public function clone():Event { return new FanSpeedEvent(speed, type, bubbles, cancelable); } override public function toString():String { return formatToString("FanSpeedEvent", "speed", "type", "bubbles", "cancelable", "eventPhase") } public function get speed():Number { return _speed; } } } 2011 7 2
  • 12. Signals Event 2011 7 2
  • 13. Signals addEventListener(listener:Function) removeEventListener(listener:Function) dispatchEvent(new ExampleEvent(ExampleEvent.EVENT_TYPE)) add(listener:Function) addOnce(listener:Function) remove(listener:Function) removeAll() dispatch(... valueObjects) 2011 7 2
  • 14. Signals add(listener:Function) addOnce(listener:Function) remove(listener:Function) removeAll() dispatch(... valueObjects) addWithPriority(listener:Function, priority:int=0) addOnceWithPriority(listener:Function, priority:int=0) 2011 7 2
  • 15. Signals if (stage) init(); else new NativeSignal(this, Event.ADDED_TO_STAGE, Event ).addOnce(init); init 2011 7 2
  • 16. Signals var accelerate:Signal = new Signal(Number); accelerate.dispatch(speed); function onAccelerate(speed:Number) { } accelerate.add(onAccelerate); 2011 7 2
  • 17. Signals NativeSignal Signal DeluxeSignal Class 2011 7 2
  • 18. Signals github : as3-signals https://github.com/robertpenner/as3-signals Robert Penner Programming Macromedia Flash MX mx.motion.easing.* fl.motion.easing.* 2011 7 2
  • 19. Signals github : as3-signals https://github.com/robertpenner/as3-signals/wiki https://github.com/robertpenner/as3-signals/wiki/_pages http://www.himco.jp/articles.php inzumatv.com http://www.inazumatv.com/contents/archives/tag/signals 2011 7 2
  • 20. www.inazumatv.com/contents/ me.beginsprite.com www.sidevision.co.jp @taikiken 2011 7 2