This is my Flash for Android second app and I need to lock the orientation to landscape only.
When publishing via CS5, I set: Aspect Ratio: Fullscreen, Fullscreen: true, autoOrients: false - this shows up in the XML file and it works on the emulator, but not on the actual device (HTC Desire). As far as i can tell, this is what I need to do.
I can't figure out for the life of me why not. Could it be the stage size? I've set it to Width 800, height 480. I do *sometimes* get the error that the Air Debugger Launch program has stopped working. Could this be an issue?
Any help or pointers?
Aspect Ratio: Fullscreen stands out for me as something that looks wrong from your description. It should be 'portrait' or 'landscape'. Or is that just an error in your post?
Here's some settings I use to lock an App into portrait mode, which works on my HTC Desire:
It is a 480x800 fla.
There's also an AIR actionscript 'Stage' property which sets orientation mode too. Maybe this would help? Although it should be redundant if you have set it up from the XML.
If you get the debugger working, see what it traces out as the orientation, stage width and stage height. This would give us a clue as to what's happening.
Sorry, I must have been tired when I typed that. Yes, I have the same XML code as you except with landscape instead of portrait in the AspectRatio tag. The tags are generated by CS5 automatically.
The AIR actionscript to set the stage orientation has been deprecated.
No, I haven't tried the debugger - I'll do that and see. As far as I can tell, I'm doing everything right, though, which means it could be a bug in AIR except if so I should have heard about others with the same problem.
Hmm, another user is having the same issue on HTC Desire:
http://forums.adobe.com/thread/786606?tstart=0. I posted a solution for her auto orient issue, but the landscape mode problem may be a problem with AIR on that particular device.
OK fixed it.
If anyone else is having this problem, here's what happened.
Before you can publish to Android with Flash, you need to download an extension, and I was still using the pre-release extension. The pre-release extension worked perfectly except for the orientation problem.
The extension I was using was: AIRforAndroid_FlashCS5_070510.zxp
and I replaced it with flashpro_extensionforair_p2_112210.zxp
Europe, Middle East and Africa