Page 1 of 1

Help needed, Getting analog inputs to flash

Posted: Wed Oct 03, 2012 3:03 am
by Hannamja
I have just started using Phidgets/Actionscript 3 and I have met into some problems when trying to get Flash to obtain values from Phidgets.

I am using 1018_2 and 1122/1135 as the sensors. I have read multiple documents on the website and they state that I will need to use the getSensorValue(index: int) function to obtain the value for the sensors. Can someone please help me write the code to capture the values for sensors 1 and 0?

var current:int;
function getSensorValue( 1 : int ):int
{ current = getsensorvalue[1]}

Here is how I tried to put the value at sensor 1 to var. What am I doing wrong?

Further more, when I use public var phid:com.phidgets.PhidgetInterfaceKit;, I will get the error "The public attribute can only be used inside a package."

I have linked the file that I refered to when doing the code(Forums does not allow attaching PDF files). http://www.phidgets.com/documentation/T ... _Flash.pdf

Thanks in advance!

Re: Help needed, Getting analog inputs to flash

Posted: Thu Oct 04, 2012 10:38 am
by Hannamja
Hmmm No one able to help me with this simple request? :?