android - Adapt game to device resolution with Adobe AIR -


I want to keep my flash game on Android for Adobe Air but I do not know how to change everything But is there a way to do this? I tried with this script found in an Adobe guide:

  function handle resize (... ig): zero {var deviceSize: rectangle = new rectangle (0, 0, stage. Stagewidth, Phase .stageHeight); } HandleResize ();   

It does not work and I have not really understood this how it should work.

Nehru, it is not going to work your application for different device sizes There are hundreds of ways to customize that I've found to expose the simplest method, in fact I have an air app that is currently working like this:

First of all, you do Make sure that all your games are from the platform in a single display object container. C, for example "game". You can then save it again by using it as the device's smallest dimension reference. Voila:

  public event createGame (): zero {addChild (scaleAndAlign (new game)); } Public Function Scale and Agglines (Target: Display Object): Display Object {var Scale: Number = 720 / Stage. Preserved; Target.scaleX = 1 / scale; Target.scaleY = 1 / scale; Target.y = (stage.stageHeight - target.height) / 2; Return target; }   

Be careful! Your app will be cross-fit to fit the entire device. If you have any doubts about the result to test this device for different device resolutions, check out our robot app on PlayStore and view the results.

I.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -