0

I have developed a game in starling and after fixing multi resolution issue , i stuck into another one

when I try implementing Revmob banner ads on bottom it shows in the middle of the screen on samsung note - but on samsung galaxy S2 , it show on the bottom which is perfect. I don't know how to fix this problem here is two ways i am trying to implement revmob banner ad

Game.revmob.showBanner(0 , stage.stageHeight);

OR

Game.revmob.showBanner(); here is the code for multi resolution

public class FTC extends MovieClip
{

    public static var star:Starling;
    public static var debugSprite:flash.display.Sprite;
    public static var _baseWidth:Number = 480;
    private static const STAGE_WIDTH:int = 320;
    private static const STAGE_HEIGHT:int = 480;
    public static var DIMX:Number;
    public static var DIMY:Number;
    /**
     * The height that the app is based on, this should be the lowest height such as 480 (iphone) or 512 (ipad)
     */
    public static var _baseHeight:Number = 800;
    public function FTC()
    {
        this.stage.align = StageAlign.TOP_LEFT;
        this.stage.scaleMode = StageScaleMode.NO_SCALE;
        Starling.handleLostContext = true;

          // Get the preferred stage size based on our smallest target resolution
        var stageArea:Rectangle = new Rectangle(0, 0, STAGE_WIDTH, STAGE_HEIGHT);

        // Get the fullscreen size available
        var fullscreenArea:Rectangle = new Rectangle(0, 0, stage.fullScreenWidth, stage.fullScreenHeight);

        // Fit the stage to the full screen. ScaleMode.SHOW_ALL ensures that everything will be visible (not croping will occur).
        var viewport:Rectangle = RectangleUtil.fit(stageArea, fullscreenArea, ScaleMode.SHOW_ALL);

        // Create a new instance and pass our class, the stage and the wished viewport
        star= new Starling(Game, stage, viewport);

        // Show debug stats
       // star.showStats = true;

        // Define level of antialiasing,
        star.antiAliasing = 1;

        // Set to our preferred stage size
        star.stage.stageWidth = STAGE_WIDTH;
        star.stage.stageHeight = STAGE_HEIGHT;

        star.start();
    }
    private function onResized(e:Event):void
    {
        var viewPort:Rectangle = star.viewPort;
        viewPort.width = this.stage.stageWidth;
        viewPort.height = this.stage.stageHeight;
        star.viewPort = viewPort;
        star.stage.stageWidth = stage.stageWidth;
        star.stage.stageHeight = stage.stageHeight;

    }

}
Arslan Ali
  • 11
  • 3

1 Answers1

0

Try to check if the "onResized" Method has been called or maybe you can force a call to it by placing a onResized(null); after the star.start(); call.

Fabio
  • 3
  • 3