Tutorial / Using with Flash

Code Example 2: LED.fla

This example shows how to control the LED on your module. The basic structure is same as the previous example. You can easily control the output side by calling corresponding methods like this.

  1. import gainer.*;
  2.  
  3. var gnr:Gainer = new Gainer("localhost", 2000, Gainer.MODE1, true);
  4.  
  5. gnr.onReady = function() {
  6.     sqr.onPress = function() {
  7.         gnr.turnOnLED();
  8.     }
  9.     sqr.onRelease = function() {
  10.         gnr.turnOffLED();
  11.     }
  12. }
prev 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 next
Print