Jump to content

  • Log In with Google      Sign In   
  • Create Account






AS3 Controls

  Posted by johnhattan, 12 July 2011 · 300 views

Still doing my mobile games here. One problem I ran into is with controls. My games aren't very control-heavy, but there are times that I do need to impart a little textual or columnar information to the user (i.e. help and high scores). And I'd really rather not roll my own. And this problem is compounded by Adobe's apparent abandonment of the control model for mobile Flash.

Mind you, the standard AS3 Flash/Flex controls render fine in mobile apps. Problem is, a lot of the controls are not at all finger-friendly. Some controls, like PushButtons, work fine. After all, clicking a button with a mouse and tapping a button with your finger is the same operation as long as you make the button large enough to accommodate a finger. Some operations though, like scrolling a text-field with a scrollbar, are frustrating. Adobe addressed this on Flex by releasing several finger-friendly controls. But unlike the previous releases of AS3 controls, they didn't keep parity with Flash. If you're using Flash with mobile, and you want controls, you're pretty-much on your own.

I have played around with a couple of the mobile-friendly Flash control sets out there, but none of 'em really set me on fire. Some looked good but looked more like Android than iOS. Some were built around an odd model that made it difficult for me to just say something easy like myTextField = new TextField().

And I understand that it'll take time. The AS3 controls that come with Flash are pretty danged robust and well documented, and you won't be able to duplicate all that functionality in the short term. But I did find this, which I think is pretty interesting. Rather than write new controls, the author just wrote subclasses for the touch-unfriendly controls and added touch-friendly events. So, for example, you can now have a TouchDataGrid object that's just the old standard DataGrid control, only the mouse events are overloaded so you can drag in it with your finger to scroll it around.

And that's great for me, because I don't wanna have to mess with controls. I'd much rather create a DataGrid and populate it with high score data than manage all the drawing myself. When I use standard controls, it's usually for stuff that I just want to implement and then ignore so I can work on the game. For example, Help.

Posted Image

Wow, a scrolling text field and an OK button. Don't wanna spend much time on that!

One thing you'll notice is the little scroll-elevator thing on the right side. On iOS and Android, that little scroll indicator only appears when things are actually scrolling. And I don't really like that. Dice-A-Rama actually got down-rated on iTunes because one reviewer stated that there are just a couple sentences of help without a detailed rundown of scoring. And that's not true. There's quite a lot of help and detailed scoring for each game, but you get the impression that there's just one screen because there's no indication that you're looking at a scrolling field and there's more to see. And I do realize that it's an OS sin to go against the One True Mobile Look, but I think it's an equal OS sin to hide from the user that there's more information to be seen. So I'll either leave the scroll indicator on or I'll add some "drag the danged screen to read more help" text.https://blogger.googleusercontent.com/tracker/5927544581291786949-1165397969220548693?l=thecodezone.blogspot.com

Source




Recent Entries

Recent Comments

PARTNERS