Jul
3
Launch Game
Embed Code

Keypad Test

Description : 
Another proof of concept, this one simply deals with embedding a complex SWF item in the scene, one that requires more interaction than just clicking anywhere in it, in this case a keypad. The password is "1313".

Behind the scenes its simple enough: the keypad.swf has a command in frame 1 that reads "hijack=1;". This makes it so that all mouse interactions (clicking, roll over, etc) are now handled by keypad.swf directly as opposed to the engine. This has the unwanted side effect of disabling the drag-and-drop features in the editor, as well as the tool tip text, but it allows the game author to have complex interactions with the swf, in this case clicking a series of numbers. When the interaction is done, the swf sends another command "executeAction()"; and so the engine takes over again, assigns Keys Found, runs Outputs, etc.

Its a start :)

In the future, we'll have a full range of API-like commands so that SWFs can directly give keys, lose keys, etc etc. Also, we'll have to figure out a way around the Flash Security Model if we want to run cross-domain commands between the SWF and the engine..

Image Preview: