Grab the domain the HTML5 game is running on. Libgdx - html

It's possible to grab the local domain/ip the HTML5 game is running on? Framework is Libgdx.

To receive the local domain in Libgdx it is possible to use com.google.gwt.user.client.Window.Location.

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

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

whats the difference between stratus and flash media server 4

I want to create a simple video chat application using rtmfp the new p2p feature. It's available in flash media server 4 and using stratus, I've only been able to find tutorials on stratus. So my question is if I want to use the p2p feature in flash media server 4 do I have to signup for stratus and use its api or does fms 4 have its own api?
What is your goal? If you need to make just a videochat, you can use FMS only, without stratus. Just connect to server, perform connection accept on serverside, and then you can use publish and play methods of NetStream class. But if you want to perform videochat through p2p, than you do not need FMS (because the main idea of p2p - communication without server), but still you can use FMS for managing clients, and perform video streaming through stratus.

AS3 USB game controller support

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.