The Gainer Flex3 analog out programming
by admin on 2 月.10, 2009, under USB controlle
I described the program of a very simple analog out with Flex3. I made a screen of Flash in mxml and described ActiveScript in another .as file.I make one slider controller of Flash and change output data of analog if I let a controller slide. It is powered by two AA batteries in gainer this time and operates a DC motor.
mxml : demo.mxml
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init();" width="575" height="271" viewSourceURL="bin/index.html"> <mx:Script source="Motor.as" /> <mx:Text x="146" y="66" text="aout 0"/> <mx:HSlider x="195" y="66" id="ao0" minimum="0" maximum="255" mouseUp="aOut();"/> </mx:Application>
AS:Motor.as
import gainer.Gainer;
public var gnr:Gainer;
public function init():void
{
gnr = new Gainer("localhost", 2000, Gainer.MODE1, true);
}
public function aOut():void
{
gnr.analogOutput(0,ao0.value);
}

1 comment for this entry:
Leave a Reply
You must be logged in to post a comment.
6 月 30th, 2010 on 5:43 PM
Buy:Buspar.Advair.Prozac.Zocor.Lasix.Cozaar.Female Cialis.Lipothin.Lipitor.Ventolin.Wellbutrin SR.Amoxicillin.Zetia.Aricept.Female Pink Viagra.Acomplia.Benicar.SleepWell.Seroquel.Nymphomax….