Package | cc.cote.jmulator.emulators |
Class | public class IpacVe |
Inheritance | IpacVe ![]() ![]() |
Using this class is straightforward. You create an IpacVe object and then add listeners to it for the inputs you are interested in. Here is a simple example to get you started :
import cc.cote.jmulator.emulators.IpacVe; import cc.cote.jmulator.events.IpacVeEvent; var emu:IpacVe = new IpacVe(stage); emu.addEventListener(IpacVeEvent.INPUT_2COIN, test); function test(e:IpacVeEvent):void { trace(e); }
Please note that this class will only work with encoders using the default (MAME) settings and not with custom programs.
Limitations
Flash Player is currently unable to detect a KEY_DOWN or KEY_UP event for the ALT key. This means that the input labeled "1SW2" (which uses the ALT key in the default MAME configuration) does not work in Flash Player. In Adobe AIR, the "1SW2" input works fine.
Also note that the 1SW4 input - which is assigned to the SHIFT key - will never be in typematic mode. This is the behaviour of the SHIFT key on most modern operating systems and has nothing to do with your board, Flash or this library.
See also
Method | Defined By | ||
---|---|---|---|
IpacVe(listenOn:InteractiveObject, typematic:Boolean = false, triggering:String)
Creates an IpacVe object extending the base Emulator object. | IpacVe | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void [override]
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | Emulator | |
![]() | dispose():void
Properly disposes of ressources used by the object, namely, the listeners. | Emulator | |
![]() | isActive(input:String):Boolean
Returns the current status (activated or not) of a specific board input. | Emulator |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when any of the board's input changes. | IpacVe | |||
Dispatched when there is a change on the board input labeled "1A" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1B" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1COIN" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1DOWN" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1LEFT" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1RGHT" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1STRT" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW1" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW2" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW3" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW4" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW5" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW6" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW7" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1SW8" | IpacVe | |||
Dispatched when there is a change on the board input labeled "1UP" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2A" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2B" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2COIN" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2DOWN" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2LEFT" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2RGHT" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2STRT" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW1" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW2" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW3" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW4" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW5" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW6" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW7" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2SW8" | IpacVe | |||
Dispatched when there is a change on the board input labeled "2UP" | IpacVe |
IpacVe | () | Constructor |
public function IpacVe(listenOn:InteractiveObject, typematic:Boolean = false, triggering:String)
Creates an IpacVe object extending the base Emulator
object. On top of
inherited properties, this object defines the board-specific mappings between the label
and key codes generated.
listenOn:InteractiveObject — An InteractiveObject to attach the keyboard listener to. Usually
this is the Stage.
| |
typematic:Boolean (default = false ) — Whether or not to let the OS' typematic feature send multiple
events.
| |
triggering:String (default = NaN ) — The method to use to trigger events. Can be one of
EmulatorTriggerMode.TRIGGER_ON, EmulatorTriggerMode.TRIGGER_OFF or
EmulatorTriggerMode.TRIGGER_BOTH (default). TRIGGER_ON means to
dispatch the events only when the input is activated, TRIGGER_OFF
means to dispatch the events only when the input is deactivated and
TRIGGER_BOTH means to trigger events when the input is activated and
deactivated.
|
See also
anyInput | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.ANY_INPUT
Dispatched when any of the board's input changes.
TheANY_INPUT
constant defines the value of the type
property
of a anyInput
event object.
input_1a | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1A
Dispatched when there is a change on the board input labeled "1A"
TheINPUT_1A
constant defines the value of the type
property of
a input_1a
event object.
input_1b | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1B
Dispatched when there is a change on the board input labeled "1B"
TheINPUT_1B
constant defines the value of the type
property of
a input_1b
event object.
input_1coin | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1COIN
Dispatched when there is a change on the board input labeled "1COIN"
TheINPUT_1COIN
constant defines the value of the type
property
of a input_1coin
event object.
input_1down | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1DOWN
Dispatched when there is a change on the board input labeled "1DOWN"
TheINPUT_1DOWN
constant defines the value of the type
property
of a input_1down
event object.
input_1left | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1LEFT
Dispatched when there is a change on the board input labeled "1LEFT"
TheINPUT_1LEFT
constant defines the value of the type
property
of a input_1left
event object.
input_1rght | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1RGHT
Dispatched when there is a change on the board input labeled "1RGHT"
TheINPUT_1RGHT
constant defines the value of the type
property
of a input_1rght
event object.
input_1strt | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1STRT
Dispatched when there is a change on the board input labeled "1STRT"
TheINPUT_1STRT
constant defines the value of the type
property
of a input_1strt
event object.
input_1sw1 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW1
Dispatched when there is a change on the board input labeled "1SW1"
TheINPUT_1SW1
constant defines the value of the type
property
of a input_1sw1
event object.
input_1sw2 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW2
Dispatched when there is a change on the board input labeled "1SW2"
TheINPUT_1SW2
constant defines the value of the type
property
of a input_1sw2
event object.
input_1sw3 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW3
Dispatched when there is a change on the board input labeled "1SW3"
TheINPUT_1SW3
constant defines the value of the type
property
of a input_1sw3
event object.
input_1sw4 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW4
Dispatched when there is a change on the board input labeled "1SW4"
TheINPUT_1SW4
constant defines the value of the type
property
of a input_1sw4
event object.
input_1sw5 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW5
Dispatched when there is a change on the board input labeled "1SW5"
TheINPUT_1SW5
constant defines the value of the type
property
of a input_1sw5
event object.
input_1sw6 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW6
Dispatched when there is a change on the board input labeled "1SW6"
TheINPUT_1SW6
constant defines the value of the type
property
of a input_1sw6
event object.
input_1sw7 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW7
Dispatched when there is a change on the board input labeled "1SW7"
TheINPUT_1SW7
constant defines the value of the type
property
of a input_1sw7
event object.
input_1sw8 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1SW8
Dispatched when there is a change on the board input labeled "1SW8"
TheINPUT_1SW8
constant defines the value of the type
property
of a input_1sw8
event object.
input_1up | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_1UP
Dispatched when there is a change on the board input labeled "1UP"
TheINPUT_1UP
constant defines the value of the type
property
of a input_1up
event object.
input_2a | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2A
Dispatched when there is a change on the board input labeled "2A"
TheINPUT_2A
constant defines the value of the type
property of
a input_2a
event object.
input_2b | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2B
Dispatched when there is a change on the board input labeled "2B"
TheINPUT_2B
constant defines the value of the type
property of
a input_2b
event object.
input_2coin | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2COIN
Dispatched when there is a change on the board input labeled "2COIN"
TheINPUT_2COIN
constant defines the value of the type
property
of a input_2coin
event object.
input_2down | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2DOWN
Dispatched when there is a change on the board input labeled "2DOWN"
TheINPUT_2DOWN
constant defines the value of the type
property
of a input_2down
event object.
input_2left | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2LEFT
Dispatched when there is a change on the board input labeled "2LEFT"
TheINPUT_2LEFT
constant defines the value of the type
property
of a input_2left
event object.
input_2rght | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2RGHT
Dispatched when there is a change on the board input labeled "2RGHT"
TheINPUT_2RGHT
constant defines the value of the type
property
of a input_2rght
event object.
input_2strt | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2STRT
Dispatched when there is a change on the board input labeled "2STRT"
TheINPUT_2STRT
constant defines the value of the type
property
of a input_2strt
event object.
input_2sw1 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW1
Dispatched when there is a change on the board input labeled "2SW1"
TheINPUT_2SW1
constant defines the value of the type
property
of a input_2sw1
event object.
input_2sw2 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW2
Dispatched when there is a change on the board input labeled "2SW2"
TheINPUT_2SW2
constant defines the value of the type
property
of a input_2sw2
event object.
input_2sw3 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW3
Dispatched when there is a change on the board input labeled "2SW3"
TheINPUT_2SW3
constant defines the value of the type
property
of a input_2sw3
event object.
input_2sw4 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW4
Dispatched when there is a change on the board input labeled "2SW4"
TheINPUT_2SW4
constant defines the value of the type
property
of a input_2sw4
event object.
input_2sw5 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW5
Dispatched when there is a change on the board input labeled "2SW5"
TheINPUT_2SW5
constant defines the value of the type
property
of a input_2sw5
event object.
input_2sw6 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW6
Dispatched when there is a change on the board input labeled "2SW6"
TheINPUT_2SW6
constant defines the value of the type
property
of a input_2sw6
event object.
input_2sw7 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW7
Dispatched when there is a change on the board input labeled "2SW7"
TheINPUT_2SW7
constant defines the value of the type
property
of a input_2sw7
event object.
input_2sw8 | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2SW8
Dispatched when there is a change on the board input labeled "2SW8"
TheINPUT_2SW8
constant defines the value of the type
property
of a input_2sw8
event object.
input_2up | Event |
cc.cote.jmulator.events.IpacVeEvent
cc.cote.jmulator.events.IpacVeEvent.INPUT_2UP
Dispatched when there is a change on the board input labeled "2UP"
TheINPUT_2UP
constant defines the value of the type
property
of a input_2up
event object.