Active X control for Adobe Director seems to not work at all

Legacy support with Phidget21
kyleg
Phidgetly
Posts: 19
Joined: Mon Jul 14, 2008 7:32 am

Active X control for Adobe Director seems to not work at all

Postby kyleg » Mon Feb 01, 2010 10:46 am

except for inputs on a few interface kits that is.

As of october 09 I see the library installs active X controls for all phidgets. Didn't see them listed prior. This is great and I can read inputs and also get serial number. But beyond that I get a script error everytime when trying set a output line or even put the condition of an output line or input line to the message window. Basically anything that has to do with sending with output functions. I have read all the documentation and have tried for hours. Did phidgets just leave something out regarding this? This should be the simple command for output on the interface kit. Kit is sprite 1 and its called and I can already get input line status.

on mouseup
sprite(1).OutputState(0,1) --board 0, line 0 is on
put sprite(1).OutputState(0)--send status of line to message window
end


The guide for director was posted in June 09 by a phidgets employee I suppose seems pretty recent so it has to be something simple. It states 11.5 was used. I have tried 8.5 MX, MX2004, 11 and 11.5 with no avail. The error when trying to send any output command and most other command is:

Script error: Error
sprite(1).OutputState(0,1)
-2147467259


what does -2147467259 mean?
Are there only a handful of commands that will work?

User avatar
Patrick
Lead Developer
Posts: 3056
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Active X control for Adobe Director seems to not work at all

Postby Patrick » Mon Feb 01, 2010 12:47 pm

I don't actually know Director. In the getting started it says to set an output using:

Code: Select all

sprite(1).CallString("OutputState(0,1)")

I'm assuming that this doesn't work for you?
Also, you will need to make sure that the Phidget is open and attached before setting an output - that what the waitForAttachment bit is for.

As for the error code - -2147467259 == 0x80004005 which is E_FAIL.

-Patrick

kyleg
Phidgetly
Posts: 19
Joined: Mon Jul 14, 2008 7:32 am

Re: Active X control for Adobe Director seems to not work at all

Postby kyleg » Wed Feb 03, 2010 10:07 am

Patrick,

Thanks for response. Phidget is open and called and I send a command to test input (which works fine). after confirmation that I have control of the phidget, the command is sent for a call to an output line which fails. Note input calls and serial number seem to be the only functions that work on all phidgets

what is the error "0x80004005 which is E_FAIL." mean? ...failure to execute function? sounds about right since it happens when calls to the control that fail.

The example in the getting started guide

sprite(1).CallString("OutputState(0,1)")

is stating that CallString is to be replaced by your desired call. CallString is not literally typed nor is the quotes out parenthasis surrounding. so....

("OutputState(0,1)")

is
OutputState(0,1)

This is how it works for the function that execute and perform fine including the waitForAttachment call that must be done when you start your program.

Just in case I tried many variations like spelling out callstring and using the call as stated ("OutputState(0,1)")

...but when done like that it doesn't even let the program run from the start...errors imediately. It's actually confusing that the guide states an example of

CallString("OutputState(0,1)")

as it took me some time to figure out the correct syntax cause i kept wanting to spell out callstring literally

that example should probably be corrected in the on-line PDF guide.

It appears the phidget employee who wrote the guide has tested and has knowledge of the working of this in order to make the PDF? Do you know who at Phidgets may have posted this document? Perhaps he or she can shed more light on this?

Thanks!

kyleg
Phidgetly
Posts: 19
Joined: Mon Jul 14, 2008 7:32 am

Re: Active X control for Adobe Director seems to not work at all

Postby kyleg » Tue Feb 09, 2010 8:05 am

Patrick,

Any luck tracking down who at phidgets wrote the Director User guide? Any luck in validating what might be the issue for all active X control not working as tested. I bought a set of phidget interface kits based on the assumptions that they would talk to director. If it has been tested at phidgets to work, then hopefully it is just something simple.

Kyle

User avatar
Patrick
Lead Developer
Posts: 3056
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Active X control for Adobe Director seems to not work at all

Postby Patrick » Tue Feb 09, 2010 10:44 am

It should be pretty simple to get it working. The guy who wrote the guide doesn't work here anymore, so I'll have to find someone else to look at it.

-Patrick

AdamS

Re: Active X control for Adobe Director seems to not work at all

Postby AdamS » Tue Feb 09, 2010 3:56 pm

So I played with Adobe Director today going from the Getting Started we have up and the Getting Started looks to be correct.

I will be uploading a code sample package to the Programming section which should include the director file that I created. It works fine as far as I can tell. It can read the sensor values of a sensor I had plugged in. I had a red LED plugged into digital output index 0 and the checkbox is able to turn off and on that LED using the sprite(1).CallString("OutputState(0,1)") call.

One thing to note, the Getting Started manual assumes use of the Lingo syntax. Could this have been the issue.

Anyways, you can take a look at my sample once I have it up there.

kyleg
Phidgetly
Posts: 19
Joined: Mon Jul 14, 2008 7:32 am

Re: Active X control for Adobe Director seems to not work at all

Postby kyleg » Wed Feb 10, 2010 10:32 am

I had errors when I used the CallString spelled out leterally in lingo. I will take a look at what you post and then try it and see. Yes an actual cut and paste from the lingo you have or better yet like you said an actuall file would be really good to look at...should be no question then on the syntax.

Many thanks for looking into this...I will check for the updates to the programming site

Marcel04
Fresh meat
Posts: 1
Joined: Tue Feb 21, 2012 5:01 am
Contact:

Re: Active X control for Adobe Director seems to not work at

Postby Marcel04 » Tue Feb 28, 2012 4:49 am

Hello

It has been a while, but I have a problem with Director and the board as well.

I've tried the example file and the sprite(1).CallString("OutputState(0,1)") call described above by AdamS...all don't work.
The led in output 0 is not going on...

Hope someone can get me in the right direction.

Thnx,

M

belleqq
Fresh meat
Posts: 1
Joined: Wed Apr 16, 2014 4:41 am
Contact:

Re: Active X control for Adobe Director seems to not work at

Postby belleqq » Mon Mar 14, 2016 1:44 pm

Hi guys. Just had the same issue happen to me after several projects working with the phidgets with no issues from using Callstring("OutputState(0,-1)"). Additionally, note that it's really -1 and not 1.

But getting back to what happened. I suddenly had the problem when I installed a Director project to two new pcs with Windows 10. Strangely, the third one I installed to worked. Initially, I thought I had problems with my code so tried to make the code work for the other two. it worked when I changed the comma between the index number and the output state to a semi colon! Now putting the semicolon version to the one PC that worked now didnt work. I checked the languages for the Windows 10 installed and saw that one had English (US) as language and the other two had English (Philippine) installed. Voila! Changed the other two to English and now everything's working again. :)


Return to “ActionScript 3.0 - Flash CS3 / Flex / AIR”

Who is online

Users browsing this forum: No registered users and 0 guests