Groups | Blog | Home
all groups > macromedia flash handhelds > january 2005 >

macromedia flash handhelds : Hardware Interaction with Flash


john caro
1/9/2005 8:46:05 AM
I am wanting to Interact with the buttons on a pda with Flash. Can Flash listen for Operating or Hardware events?

Yechezkal Gutfreund
1/18/2005 8:36:00 PM
The best way we have found to talk to devices (iPAQ buttons, BlueTooth
devices, etc) is to write and test
a .NET CompactFramework (CF) program or some other embedded program (Java,
evB, etc) and then establish
a communication channel to Flash via the XMLSocket(). You can send string
information both ways
(.send() and .onData() )


--
==================================
Yechezkal Gutfreund
Chief Scientist
Kesser Technical Group, Inc.
==================================
[quoted text, click to view]

sneakyimp
1/18/2005 11:16:42 PM
As far as I know, the only hardware flash can interact with directly is the
microphone input and a video input (go to any flash movie in your browser and
right-click it...if there's a menu option called 'settings' then click that).

Flash can also interact with executable files IF they are placed in a
subdirectory called FSCommand but i have NO IDEA what the bounds of this
interaction are, etc. Can someone help us?

I am trying to tackle this exact same problem because I want my flash movie to
interact with a magnetic card reader device (like hotel key cards) and respond
based on what it read from the card.

anyone?
sneakyimp
1/19/2005 2:28:26 AM
THANKS. That sounds just fantastic. I have Visual Studio (C++) and could in
theory develop some component.

are you suggesting that the program be embedded in the HTML document or
embedded in flash somehow? I understand that developing activeX controls is
sometimes complicated and elaborate. Could I develop an EXE or DLL and put it
in the fscommand folder?

also, when you create the socket object in actionscript, what is the
address/port that you connect to? localhost?
Yechezkal Gutfreund
1/19/2005 12:46:12 PM
1. I suggest creating an exe, that either the user starts, or that the
fscommand starts
(from then on control is done via the TCP pipe (including shutdown). But
their should
be a user friendly way to shut down the program (GUI) in addition, so
that he does not have
to do a soft reset to get rid of it and free the TCP pipe

2. Yes, connect to localhost, but use a port that is above 1024, just to be
safe and not interfere with other stuff
on the PPC. Also remember to terminate all messages from the C++ program
with a NULL '/0' to indicate
to FLASH the end of the message. (proper framing) and that it should
invoke your .onData() routine.

3. Speed is quite good, as long as your are not sending huge string-coded
binaries.


[quoted text, click to view]

john caro
1/19/2005 7:55:29 PM
Wow, that sounds like the right direction. Thank You
I am not an advanced coder, so I would need help setting up that interaction.
Do you have any code samples , tutorials or references to help clarify?
Yechezkal Gutfreund
1/20/2005 9:02:01 AM
Your main issue is going to be the bar-code device, writing the eC++ and
debugging it.

I suggest hiring an "advanced coder". Or contract a eMVP (I do this when I
get stuck, they are worth it, even
just for advice). You should have budgeted for this with the client who is
asking you to do it.



[quoted text, click to view]

chinmay shah
2/2/2005 11:17:33 AM
As far as I know, the only hardware flash can interact with directly is the
microphone input and a video input (go to any flash movie in your browser and
right-click it...if there's a menu option called 'settings' then click that).

Flash can also interact with executable files IF they are placed in a
subdirectory called FSCommand but i have NO IDEA what the bounds of this
interaction are, etc. Can someone help us?

I am trying to tackle this exact same problem because I want my flash movie to
interact with a magnetic card reader device (like hotel key cards) and respond
based on what it read from the card.

Yechezkal Gutfreund
2/3/2005 7:43:20 PM
I answered this in an earlier part of the thread.

[quoted text, click to view]

Yechezkal Gutfreund
2/3/2005 7:44:35 PM
The best way we have found to talk to devices (iPAQ buttons, BlueTooth
devices, etc) is to write and test
a .NET CompactFramework (CF) program or some other embedded program (Java,
evB, etc) and then establish
a communication channel to Flash via the XMLSocket(). You can send string
information both ways
(.send() and .onData() )

We have used this approach and use this to capture the hardware buttons and
other hardware
specific information.


[quoted text, click to view]

AddThis Social Bookmark Button