Skip to main content
Inspiring
January 7, 2013
Question

FB 4.7 Mobile

  • January 7, 2013
  • 3 replies
  • 757 views

I am currently using FB 4.7 with AIR 3.4 and 3.5 (both tested). (just starting with FB4.7 moving from 4.6)

When I run the application or AIR Simulator, iOS Simulator and android device, the app Y position does not start on 0.

It reports it on 0 (in the trace) but the app is several pixels below.

Here is a screen shot of a text field at 0,0

code is simple:

package

{

    import flash.display.Sprite;

    import flash.display.StageAspectRatio;

    import flash.events.Event;

    import flash.system.Capabilities;

    import flash.text.TextField;

    import flash.text.TextFormat;

   

    public class SimulationTest extends Sprite

    {

        public function SimulationTest()

        {

            super();

           

          

            var appInfo:String = String(stage.fullScreenWidth + " , " + flash.system.Capabilities.screenResolutionX);// flash.system.Capabilities.version;

            trace(appInfo);

            trace(this.x + " , " + this.y);

           

         

               

            var text:TextField = new TextField();

            text.x = 0;

            text.width = 100;

            text.y = 0;

            var tf:TextFormat = text.defaultTextFormat;

            tf.size = 24;

            text.defaultTextFormat = tf;

            text.text =  appInfo;

            addChild(text);

           

          

        }

    }

}

I tried adding a sprite or a movieclip at 0,0 and same result.

I also tried with <fullScreen> true and false

and also <requestedDisplayResolution> high and standard.

Anything else I might be doing wrong?

This topic has been closed for replies.

3 replies

Colin Holgate
Inspiring
January 7, 2013

The textfield is at 0,0, but it's the SimulatorTest sprite that you're checking the x & y of. How is the SimulatorTest added to the stage?

Inspiring
January 7, 2013

SimulationTest is the Main Class.

its y is always 0.

I added an enterFrame event to it and kept tracing its y value and it is 0.

Inspiring
January 7, 2013

opening an Actionscript mobile project in FB 4.6 sets the stage scaling and alignment:

stage.align = StageAlign.TOP_LEFT;

stage.scaleMode = StageScaleMode.NO_SCALE;

By default 4.7 does not do that and that was my weird error

I feel a bit dumb though and tahnks for your time.