Bug with my Android AIR application in Android 3.1 (& 3.2)


/ Published in: ActionScript 3
Save to your folder(s)

A bug when i create an AIR application for Android ( with AIR 3.2 and target FP 11.1)

Wanted ! Someone who has an Android Tablet with Android 3.1 or 3.2 (Galaxy Tab or other tablet..). I have a big bug with the stage of the application when i want change this default aspect-ratio of the stage ( portrait to landscape ).

The system run an animation during the transition between the old and the new aspect-ratio but this transition create an infinite loop and it's impossible to stop it !


Copy this code and paste it in your HTML
  1. package test
  2. {
  3. import flash.display.Sprite;
  4. import flash.display.StageAspectRatio;
  5. import flash.events.MouseEvent;
  6.  
  7. [SWF(width="480", height="800", frameRate="24", backgroundColor="#666666")]
  8.  
  9. public class Application extends Sprite
  10. {
  11. public function Application()
  12. {
  13. if( stage )
  14. {
  15. var square:Sprite = new Sprite() ;
  16.  
  17. square.graphics.beginFill(0xFF0000);
  18. square.graphics.drawRect(0,0,100,100) ;
  19.  
  20. stage.scaleMode = "noScale" ;
  21. stage.align = "tl" ;
  22.  
  23. stage.addChild( square ) ;
  24.  
  25. stage.setAspectRatio( StageAspectRatio.LANDSCAPE ) ;
  26. }
  27. }
  28. }
  29. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.