How to integrate, run or combine a Flash game with my Titanium Appcelerator app? - actionscript-3

I have developed three different games in Flash (Action Script 3) and they run well on my smartphone when I export them via Adobe Air.
I am creating an app over Titanium, and I intend to integrate these three games inside my main Titanium app. The problem is that Adobe Air only exports APKs files.
So I would like to know if there is anyway of making the games run inside the main app, without the need of calling external apps on the market, for example.
Thanks very much

One way to achieve this would be use modular architecture. Meaning, the Main App would act as a wrapper for the three games.
In other words, you can load external SWF files (the games) in your main app using the SWFLoader class. Here is some more info about this class and how to use it, as well as module-wrapper communication info:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/SWFLoader.html
Have great day.

Related

Xamarin: how to create views / UI of an app dynamically from a Json

Have you already developed a Xamarin app whose views are generated from a Json recovered when launching the application?
I met a client with this kind of need:
they are developing a web app to prototype the screens by adding and positioning some controls (TextBox, Label, ...)
this generates a Json that must be interpreted by the Xamarin app: this will build the different views dynamically
in a first version, the user's data would be stored locally (through a file or SQLite) and synchronized "manually" when the device is connected to a computer
the app will work on Android only in a first time, and then on WPF
The client has not yet decided between Xamarin.Forms or Xamarin native, but it's probably more interesting to do it through Xamarin.Forms, even if iOS is not required: this should make porting on WPF easier.
Have worked on similar cases? Have you some recommendations? Are there plugins or patterns that could be used to simplify this development?
I've found this one, but it doesn't seem to be the same use.
There is also this article on iOS, but there is not the same thing on Android.
This would in theory be possible using a massive code behind builder for a page but should NOT be done for a production app. Mobile apps have very specific requirements that need to be thought of before attempting.
Xamarin is great for simplifying code reuse, and if you use Xamarin Forms you can reuse the UI components for Enterprise apps.(the less fancy and pixel perfect the layouts need to be the better. )
Your client would be better served by making it a mobile compatible web page instead from the details you have shared.

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

How do I incorporate both actionscripts and flash animation into a flash builder project

I am planning on making a casual educational game and was looking to do that on the flash platform for broad exposure. I am wondering what are some guidelines to determine if it is warranted to create the project purely in flash or puruse a combined Flash/Flash builder project?
How can I include all my graphics and animation files as well as my AS classes into a builder project? Does it even make sense to do that. I read that creating UIs and connecting things is simpler in Flash builder and I plan to have some interaction with the client and central server where some basic data wouold be stored? Is this a good candidate for a combined flash/flash builder approach?
Also I want this to be launched on mobile and desktop platforms if that makes a difference
Thanks in advance...
You can export all assets, made in Flash IDE to .swc file, and then attach this file to FlashBuilder Project using "ProjectProperties"->"Actionscript Build Path"->"Add SWC..." dialog. After-that you'll be able to create instances of the animated symbols within Flash Builder.

Migrate from Flash AS3 to AIR

I've been developing a project in AS3 but decided to switch to AIR instead, as I found out it's impossible to save files on user's hard drive without prompt appearing. My question is, what changes do I have to expect? is the code written in same AS3 syntax/style? Did instantiating objects / drawing shapes / positioning system / stage change in AIR? thanks.
Everything is the same from a code perspective, except that the AIR SDK includes quite a number of new APIs that are less restrictive and geared toward application development since the deployment target is no longer a web browser.
If you can, you should take a day or 2 and read thru the documentation so you will know what's available to you. Make sure to select the most recent versions of AIR and Flash Player under Packages and Class Filters: Runtimes so the docs are populated with what you need.

Best way to make a downloadable version of a Flash game?

I already made a game with flash, and I want to provide an easy download for people that would rather play offline. Thing is, i use a folder whole structure to dynamically load content per level. Folder structure looks like this, not that it matters that much:
Game folder
animations
anim1.swf
anim2.swf
sounds
music1.mp3
soundeffect1.mp3
levels
level1.lev
level2.lev
myGame.swf
How should I go to distribute this? Should I just resort to make a zip file for the flash game and assume people know how to extract and open the swf? Is there any other way to port easily as an executable? Perhaps Adobe Air (not sure if this works though)?
Thanks, and please help!
Distributing a zip file is the only option if you really want that structure to prevail. Else,
Embed all the resources in the main (myGame) swf & distribute it.
Provide a html page for people who do not have standalone flash player installed.
Embedding as a single file allows the browser to cache the single swf & allow the player to keep playing offline until cache is cleared. So user might not even need an explicit download.
If you are using Flash Builder it is fairly straightforward to compile the application into a self-installing AIR executable (or DMG on a Mac). It is possible to include the AIR runtime which would avoid potential problems of the user not having the correct flash player for example.
An alternative to AIR would be to create a projector executable from inside the standalone Flash Player or from the Flash authoring environment.
Another option to using a zip file would be to use a free installer creator such as InnoSetup or Nullsoft on Windows, or Packager on Mac. Linux users are generally more tech savvy and so a tar would probably be well understood.
Adobe AIR works wonderfully! I use it for my own project, and your project should transition over to it with little to no modification (any issues should show up in the Compiler Errors and Output). The only downside is that, past AIR 2, there isn't any Linux support.
The other option is obviously to create a standalone .SWF projector inside a zip or installer, but in my opinion, that isn't the sleekest way to deploy for desktop. The advantage of AIR over this is that it gives you access to additional desktop functions that Flash Player doesn't.