AS3 USB game controller support - actionscript-3

How can I make a USB controller control my AS3 game. I'm using the keyboard right now and I have thought about mapping the keys but I have to use a plugin for that and I just want users to be able to buy a simple controller that doesn't need any driver downloads/configuration. They should be able to plugin the USB controller and play the game through Flash Player in a browser.

One possibility... you can tell your users to download joy2key. http://electracode.com/4/joy2key/JoyToKey%20English%20Version.htm
I admit that this is not a "real answer" to your question. But it is a stop-gap solution until you figure out and implement the real solution.

Related

Multimouse functionality in AS3

I am basically looking for a way to use multiple mouse plugged into one device so that multiple pointers can be seen and operate. This is for e-learning purposes, the goal is to have multiple students play an educational game in a classroom that has only got one PC but upto 10 or more mouse connected to a PC.
I did something similar a couple years ago in microsoft XNA framework. Currently I am developing applications and games in Adobe Flash AS3 and would like to find out if there is anyway that we can have multiple mouse functionality in a flash application?
Any sort of help would be great. Thank you!
For the web, this is probably impossible. If your flash project run on Adobe Air, you can add native code to handle this kind of functionality or you can use a local socket server to send information over socket to your swf or air application.
Example for native extension

Sending data between 2 flash apps

I would like to create android/ios app that has a feature like candy crash life sending.
Is it possible in as3 to create such thing?
Do I need to use a server side or it can be done with flash and as3?
Short and simple: YES, most definitely you'll need server.
Also, bear in mind that if you plan to sell goods in the game or similar - you will need to verify the data send from the flash on the server. It's pretty easy to decompile the swf, make changes to say have unlimited moves, compile again and play.
If you're planing that, I'll suggest to make more research on how to make a "secure" game, since flash in general is considered as unsafe...

Ventrilo hook read in Flash ActionScript 3

I would like to play a flash animation when someone talks in the VoIP program Ventrilo.
I have a simple animation setup within Adobe Flash and I would like to somehow trigger it when a specific person talks "keys-up" in Ventrilo.
I know the G15 keyboard can access Ventrilo remotely and display who is talking in real time so I think it should be possible to use this event to trigger a movie clip play command if I knew how to access it. I have looked for example code but can't find any.
I know this is probably a highly complex task but I'm sure there is a genius on Stackoverflow how knows how to do it or could at least set me on the right path.
Many thanks,
This is not going to be an easy task and is going to require writing a C/C++ ANE.
You can use Windows API hooking to intercept calls from Ventrilo.
http://www.gamedev.net/topic/387670-api-hooking/
http://www.codeproject.com/Articles/2082/API-hooking-revealed
You would need to write an ANE to use this inside your AIR app.
http://www.flexjunk.com/2011/11/30/developing-an-air-native-extension-for-osx-and-windows-in-c/

Sound Cloud and FLASH

I'm having troubles with connecting flash and sound cloud api so i would really appriciate if someone with bigger experience could help me out.
Is it possible to stream an audio file through flash without
embedding the sc player? What i mean is accessing the audio file
without any redirects plus granting access through crossdomain.xml.
Is there an up to date documentation how to autenticate an
application, how to get tokens and everything necessary?
Are there any sample solutions or tutorials in flash wich is up to date and really works (what i found was pretty much outdated)?
Thank you for your answer in advance.
Regards:
Gabe
Point 2) How to authenticate with Flash?
If you are building a flash web application, you could use the Javascript SDK to authenticate, then pass the access token back to the flash app via the flash external interface.
There's tons of information on how to authenticate in Javascript. One great walkthrough is on codecademy: http://www.codecademy.com/courses/javascript-intermediate-en-txGOj/0/1

Is it possible to monitor or change the system audio volume in Adobe AIR?

I am making a game in AS3 / Adobe AIR that requires the user to react to certain sounds. Is there a way to inform the user up front if the system volume is muted? Moreover, is there a method to change the volume? If not, does an external cross-platform application exist that lets me monitor the volume and that I can call from Adobe AIR?
The only access you may have to sound volum is restricted to the application (Flash player or AIR). You can change it with SoundMixer.soundTransform.volume for the general volume or SoundChannel.soundTransform.volume for a specific sound.
To summerize, you can't access the OS sound manager's settings or state with Flash. That's why many flash websites start with a message asking the users to switch their speakers on.
Native Extensions is the way to go.
You can follow an Adobe tutorial: http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html
Or download them ready made: https://github.com/nweber/SystemVolumeNativeExtension