LEDアレイなんぞを

D

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()" width="229" height="152">
	<mx:Script>
		<![CDATA[
			import gainer.Gainer;
		
			private var _gio:Gainer;
			
			private var ledData:Array = [63, 12, 91, 94, 108, 118, 119, 28, 127, 124];
			
			private var count:int = 0;
		
			public function init():void
			{
				_gio = new Gainer("localhost", 2000, Gainer.MODE6, true);
			}
		
			private function countUp():void
			{
				_gio.digitalOutput(ledData[count]);
				trace("count=" + count);
				count = (count+1)%10;
			}
		
		]]>
	</mx:Script>
	<mx:Button x="10" y="20" label="count" click="countUp()" width="180" height="98" fontSize="36"/>
	
</mx:WindowedApplication>