Hello Josh!
I'll try to explain where I'm having difficulties. The configuration of the Starling is quiet and I use the following code to it:
package {
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.geom.Rectangle;
import starling.core.Starling;
public class AutoMode extends Sprite
{
private var _starling:Starling;
[SWF(width="320", height="480")]
public function AutoMode():void
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
Starling.handleLostContext = true;
Starling.multitouchEnabled = true;
this._starling = new Starling(Auto, this.stage);
this._starling.enableErrorChecking = false;
this._starling.start();
this.stage.addEventListener(Event.RESIZE, resizeHandler, false, int.MAX_VALUE, true);
this.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
}
private function resizeHandler(event:Event):void
{
this._starling.stage.stageWidth = 320;
this._starling.stage.stageHeight = 480;
const viewPort:Rectangle = this._starling.viewPort;
viewPort.width = this.stage.stageWidth;
viewPort.height = this.stage.stageHeight;
try
{
this._starling.viewPort = viewPort;
}
catch(error:Error) {}
}
private function deactivateHandler(e:Event):void
{
this._starling.stop();
this.stage.addEventListener(Event.ACTIVATE, activateHandler);
}
private function activateHandler(event:Event):void
{
this._starling.start();
this.stage.removeEventListener(Event.ACTIVATE, activateHandler);
}
}
}
As you can see, I created the project to work with the resolution of the iPhone 3GS, scaling it according to the device. As I understand it, to accomplish this configuration
this._starling.stage.stageWidth = 320;
this._starling.stage.stageHeight = 480;
my stage will this size, and so if any element with x and y position, when the Stage is scaled, it will respect these settings. But that's not what happened. In a Screen, which will be held the login User, put two TextInput. The code below demonstrates this:
package automode.interfaces
{
import feathers.controls.Screen;
import feathers.controls.TextInput;
public class Login extends Screen
{
private var emailInput:TextInput;
private var passwordInput:TextInput;
public function Login()
{
}
override protected function draw():void
{
this.emailInput.y = 170;
this.emailInput.width = 250;
this.emailInput.x = this.actualWidth/2 - this.emailInput.width/2;
this.passwordInput.y = 200;
this.passwordInput.width = 250;
this.passwordInput.x = this.actualWidth/2 - this.passwordInput.width/2;
}
override protected function initialize():void
{
this.emailInput = new TextInput();
this.emailInput.prompt = "Email";
this.addChild(this.emailInput);
this.passwordInput = new TextInput();
this.passwordInput.prompt = "Password";
this.addChild(this.passwordInput);
}
}
}
When I place the TextInput using its x and y coordinates, I got the following results in a screen 600x1024:
And this result is for a 320x480 screen, the exact configuration that I created my stage:
The image has a bad appearance, broken. The positions do not work, and the source, even not being bitmap, also has a bad appearance. And the screen 600x1024, when the component is focused, the text is above it. Already tried to use this property input.textEditorProperties.autoCapitalize = AutoCapitalize ... but not got success. I've looked at all the examples framework Feathers and visited several pages of the forum and could not come to any resolution. I do not understand how the game Monkey Bounty has an experience so good at several different resolutions. Any clarification will be of great help.
Thank you....
PS: Sorry the post-insensitive and the English. = S...