lash Player 8 provides an new intrinsic
class called ExternalInterface. This allows you to exchange data with external
application in a standardized way synchronously in both directions. Flash can
call an external function and get the return data and an external app can query
the Flash Player in the opposite manner. With custom instances of input drivers
in an external application, you can fire custom events into the player or query
the external objects to obtain their state. Most input drivers work with
_javascript_ and ActiveX allowing you to pipe data into Flash via
ExternalInterface. I doubt that Macromedia would support
custom input drivers now that ExternalInterface exists. The code I posted was
intended to be player version neutral and should work in Flash 5 or higher,
less those fancy v2 controls. This code is also focus neutral but is hardwired
to the instance names of the V2 controls. It would be a trivial change to make
this work through an event model. Ted ;) From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Bullotta Thanks for the ideas! I've done similar things in the past -
but specific "listeners" for various attached input devices would be
a cleaner way to go, particularly when there are multiple input fields on a
form that can accept remote or direct input. There are hacks that can be
done with "prefix" and "suffix" codes to help identify
input source, but they're messy. And the focus management can be even
more painful :(. Good ideas though! From:
flexcoders@yahoogroups.com on behalf of Theodore E Patrick Flash can handle these via a standard MS
Keyboard Wedge Driver. We shipped a kiosk with a card reader and the Flash
Player can directly parse data entered. Basically all these devices can be
reduced to keyboard input so when you swipe a card or scan a barcode, it just
types data really fast. Actually I believe I have an example that
does just this very thing… Just put 3 V2 TextInput controls on stage
and name the instances: ti_name, ti_card, ti_date and use this code: Key.addListener(this)
function onKeyDown(){
var self = arguments.callee
var k = String.fromCharCode(Key.getAscii())
if(self.storage == undefined) self.storage=””
self.storage = self.storage + k
if(self.storage.split("?").length == 3 ){
var sname =
self.storage.split("^")[1]
var scardbase =
self.storage.split("?;")[1].split("?")[0].split("=")
ti_name.text = sname
ti_card.text = scardbase[0]
ti_date.text =
scardbase[1]
self.storage =
""
}
} This will parse the values from a standard
3 phase credit card reader. In the kiosk that used this we tested cards from
starbucks, visa, amex, subway and all worked perfectly. When each type of
device, you just need to know what to look for in parsing the data received. One less thing for Ethan :) Cheers, Ted J From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Bullotta Here's another one for Ethan then... :) The Flash Player (along with Flex and AS) should have an
input extensibility model that supports input focus management and input from
other mechanisms/devices such as: - Barcode readers - RFID readers - Card readers - Others... This would open up a whole new class of applications for
Flex/Flash. - Rick Bullotta SAP Labs, LLC From:
flexcoders@yahoogroups.com on behalf of JesterXL I forwarded your request to
the
YAHOO!
GROUPS LINKS
|
- RE: [flexcoders] What I wish Flex/Flash Player could do... Theodore E Patrick
- Re: [flexcoders] What I wish Flex/Flash Player cou... JesterXL
- RE: [flexcoders] What I wish Flex/Flash Player cou... David Mendels
- RE: [flexcoders] What I wish Flex/Flash Player cou... James
- RE: [flexcoders] What I wish Flex/Flash Player... Theodore E Patrick
- RE: [flexcoders] What I wish Flex/Flash Player cou... Rick Bullotta
- RE: [flexcoders] What I wish Flex/Flash Player cou... James