Single Set of Code for BlackBerry PlayBook too
I'm looking at using the same code for all devices in MobileApplication development.
I'm found some solutions for resizing and this app was never wanting to be oriented sideways.
With the BlackBerry PlayBook it seems the res is 1024x600 which is a sideways orientation!?!
Typically as I've mentioned before it seems even deeper in my inital SplashScreen View's creationComplete init function There still isn't a stage variable properly initialized yet (that seems very wrong).
Still I'm not sure how it's best to programatically set this before initalizations. Really for that devide it's starts in a Sideways_Orientation (not declared.. thinking of a solution to understand when it's backwards?)...
Anyway after some inital tests of doing something like this in a timer waiting for a stage to randomly appear...
public function checkStageOrientation(te:TimerEvent = null):void {
if(creator.stage != null) {
if((creator.width / creator.height) < 1 && creator.stage.orientation == StageOrientation.ROTATED_LEFT) {
creator.stage.setOrientation(StageOrientation.DEFAULT);
}
else {
creator.stage.setOrientation(StageOrientation.ROTATED_LEFT);
}
}
}
I still see damaged components probable because orientation doesn't change the width and height values?... That seems wrong.
So what other then building a separate mobile application project (undesirable), do we do here.
Basically I'll take this time to add...
I know the world changes fast, and this is a great example for sure.
Basically my feelings are I never want (possible never will) to build anything but one applicatiuon that works on all plateforms.
Not building for the Mobiles would seem foolish (at least today and likely in the future).
Yes one app can work for all mobiles thanks to Flash (you rock).
I hope that I can use the MobileApplication class on the Desktop as AIR directly with 2.6+ (I think you can or we'll put Application with a Navigator it seems).
I will likely battle with a sandbox or disable stuff porting to a Web Delivered version as the best and only way to reach even more people and demonstrate the applications ability.
So long and short is I won't be able (or bothering) to deploy this on the PlayBook without this working and I'm afraid my custom MobileResizing Class will likely need to flip and flop the width and hieght based on orientation and which is wider or taller.
Basically I think I'm suggesting something like alternate Orientation Types and/or that width and height flip with orientation (I think that the problem and my expected behaviour). Or my problems are related to an earlier post about why the stage isn't ready when calling creattionComplete.
Basically it's a new wrench in the gears or inital optimizations, I don't it was expected to want to know and change orientations on the fly.
