0

I'm trying to use CreateJS to export a Flash game to HTML5 and then package the result with PhoneGap for mobile devices. This works fine.

But now I'm trying to handle orientation changes, and I'm not sure how to do this. The Flash scene has a fixed landscape orientation, and CreateJS preserves this. But if I rotate the device, I would either need to re-layout the screen objects or switch to a different screen layout.

Redoing the layout would be hard, because the original scene doesn't do this, and so the emitted CreateJS code doesn't either, and I can't see how to override the massive machine generated code base.

But switching to a different layout seems like it would lose the state of the original screen, and that's no good.

Or is this issue why a lot of games seem to pick a single orientation and don't allow rotation at all?

Joshua Frank
  • 13,120
  • 11
  • 46
  • 95
  • I'm unsure what you want to achieve: You want your app to be able to look good in portrait-mode, but you don't want to spend any work on it? Or do you simply want to lock the layout to landscape? If you want to lock it, just put this into your phonegap config.xml `` - In any case: supporting landscape AND portrait mode is usually quite a bit of work and (depending on the app) might even require different assets. – olsn Oct 10 '13 at 15:55
  • I want to be able to support both orientations, but I'm not sure of the best way to DO the work that I need to do, and so I was looking for guidance on how to arrange the app to support this. – Joshua Frank Oct 10 '13 at 19:01
  • Basically you will have to listen for orientation changes and then position each object according to the orientation - so this pretty much depends on how many objects you have - what helps is, if you are already positioning the elements relative to the stage-dimensions (fluid layout) – olsn Oct 10 '13 at 19:34

0 Answers0