Sending data between 2 flash apps - actionscript-3

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...

Related

MySQL+PHP+Flash+as3 How to save into a mySql data from a Flash AS3 2d RPG game in OFFLINE programming.?

It's my first time to ask online about my programming problem and I hope I can get feed backs as soon as possible. Me and my partner are working on a project of doing a 2D RPG game using FLASH CS5.5, AS3, PHP(Dreamweaver cs5.5) and Mysql(xampp). I would like to know if there's any way that wwe can create the game and connect it to mysql where we can save and retrieve data after a game is played and save it in the players status so that when the player plays again, he can have the last status of his game to continue. We want it to be an OFFLINE game and anywhere i search in the net, all of the tips are for online games. PLease help us. Thank you.
Assuming the game is mostly written in ActionScript 3
In order to save data on the an SQL server you need to pass the data from AS3 to PHP and insert it into the server.
To do this, you will need to become familiar with AS3's JSON library. There are numerous ways to do this, including the popular as3codelib, but the JSON library is built in and is much simpler than it first appears.
I would explain it all, but this tutorial will get you familiar with it.
P.S: Like others have said, you will want to test this locally so make sure you know how to perform basic SQL queries and run PHP scripts using XAMPP. If you do not, this should help
If you only want this to run locally (i.e. a user has their own set of data), why don't you just use a SharedObject?
This lets you save data to the users machine very easily and much more efficiently.

Adobe air or flex?

I am starting with my first application development. So far I have worked only with Html, css, js, jquery etc..
I want to create an app like the desktop gmail notifier which pings the server at regular interval, look for any messages and notifies the user. I read that Adobe Air and flex are the tools that can be used for this. I have developed the basic prototype in adobe air by studying the tutorials in net.
But the problem is that, my client doesn't want the source code to be made available to users. With air, you can see the complete source code after installation/unzipping the .air app.
Is there any way I can protect the source code? Or should I use flex and convert it to a swf? Is the source codes are protected in flex? I am not familiar with the flash action scripting. Please advice.
I think you are confused as to what Flex is. It is an SDK that is a level below the AIR and Flash SDKs. Flex is a secondary structural language that is meant to be used in conjunction with AS3, while AIR is compile-type.
It doesn't matter how you compile this, the source code will be attainable if someone really wants to get it. If you compile as an AIR app, you can unzip and get the SWF file. If you compile as a SWF, you already have that SWF. The SWF can then be decompiled using various tools.
There is no real way to hide front end code from prying eyes. Flash is definitely harder to read than HTML or CSS or Javascript, but definitely not impossible to view regardless of how you compile. Your best bet is definitely to offload as much as possible to a server and possibly obfuscate your code.
I would definitely try to explain to your client that it is simply not possible to truly hide source code from individuals who would like to access it. If someone really wants to steal the code, they can and will.
Code cannot be hided in any front end technologies, Flash (SWF, Flex or AIR) or HTML (JavaScript).
Do all the business logic at server and authentic properly for securing your data.
And AIR and Flash Player are both runtimes which play applications written in Adobe Flash or Apache Flex.
You can use a client-server implementation to hide the logic from the user and flex would just render a UI based on the business logic from the server side code(php,java or .NET) that interacts with the gmail servers
If you want proper notifications, go with AIR - access to some system-level features like toast notifications. With Flex, you'll be limited to webpage content.
About code protection - you can develop app in ActionScript and then protect compiled SWF with obfuscator for some fair defense, although there's probably no good free obfuscators. I paid some bucks for secureSWF license and consider it a good investment. Of course, determined hacker would crack app anyway (in theory,) but I would'nt worry about this too much for a simple pinger app.

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/

What are some good ways to Save/Load files in AS3?

I am writing a game in ActionScript3 using Flixel as a base. I have been unable to find a good method for saving and loading files from the player's local hard drive. I know Flixel has a way to save game data to...I think...cookies that the player doesn't really have access to, and I want to avoid this.
I first learned programming in Java, and one thing I've seen a lot of is scanning (Scanner) and printing (PrintWriter) lines of strings to/from text files. Something like this for AS3 would be my ideal, but if there are other methods I'm open.
Does AS3 have anything in its basic library that can do this task well? Are there libraries I can download and include that do this well/better?
If your game is going to run on a webpage your options are limited. Due to security concerns Flash is limited to reading and writing files specifically selected by the user.
Should you be using Air to make a standalone game, you will have regular access to the filesystem and can write files much like with Java.
If not, you will be pretty much stuck with Flash cookie equivalent, SharedObject.

What is a good Flash Socket Server for a Newbie?

I have been debating which Flash Socket Server to use for a virtual world (multiplayer game).
I want something that has a very abstract api and requires little to no server side programming.
From what I see only Smartfox and ES sort of cater to game development.
I'm open to any suggestions and if anyone knows which API is easier to learn (Smartfox or ES) don't be afraid to chime in :)
I'm currently developing a flex+smartfox mmo project.
my experience with smartfox is not so "easy", if you need some custom behaviours or some bandwidth saving protocols you just have to choose another way.
the great lack of smartfox is amf support, the data is not sent and received via a binary socket, everything is transfered as a string, so you can only imagine how bandwidth sucker the transfer is...
however the plus of smartfox is you can cluster it quite easily via terracotta and can you can implement your extensions in java, python and as3. further it supplies some ready to use functionalities such as chat rooms, friendlists, etc..
I have some experience with red5 too, it's a completely different approach, the main plus of working with it would be streaming assets such as mp3 or video to the clients, so if you need ambient sounds or something similar red5 or fms could be your choice.
however I don't have experience with electroserver nor union, so i can't say much on them.
Well, the easiest to program for would probably be Flash Media Server since you program the server in a variant of ActionScript.
I have experience with a bunch of them - FMS, ElectroServer, Union(used to be Unity), Red5, etc and I have to say that I really liked Union. Union's website has a bunch of good beginner tutorials as well.