Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
ecstasy2
Posts: 2
Registered: ‎12-10-2010
My Device: Not Specified
Accepted Solution

BB playbook offer : MXML vs Air

Hi there, don't hang me if the question seems stupid: is there any difference between building a MXML based application and using Sprite subclass?

 

Are all those kind of application are allowed for the Playbook offer?

 

Thanks.

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: BB playbook offer : MXML vs Air

Hey,

 

no one gets hung around here so no worries and welcome to the forum! the difference between MXML and "using a sprite subclass" (im going to assume you mean actionscript 3) is the structure of the code.

 

in MXML the foundation of it looks a lot like HTML but it also incorporates actionscript 3 scripts. Your main application file will be in an .mxml format. There are some playbook specific classes you will not be able to access due to incompatibilty reasons. but there are work around if you look around the forums.

 

The other alternative is using just actionscript 3 code and structure. Here you dont use any MXML coding and you simply use OOP style coding to get what you want. here you will run into some missing classes such as the MX packages.

 

There are more differences but those are the basic ones. and according to the last webinar from yesterday, both format of coding are acceptable for the offer. hope that helps and good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BB playbook offer : MXML vs Air

Early on, I did some tests between MXML vs. AS.  File size and startup time in the simulator is about 40% larger and 2-3 seconds slower respectively.  this is just having 1 button in the application to close it.  Your application may vary.  MXML (for me) is more productive in getting the layout correct and maintained, but since the GUI are a lot simplier than my normal AIR/Flex applications, that seem sto be less of an issue (but still would love to use MXML if the filesize issue would go away).

Developer
pedgarcia
Posts: 119
Registered: ‎03-10-2010
My Device: Bold 9000

Re: BB playbook offer : MXML vs Air

Yesterday, during the webcast, it was clearly stated that there is nothing "technical" that would prevent your app to be accepted and entitled to the free Playbook, which means that doesn't matter what resources/libraries you used to build your application, as long as it follows the terms and conditions.

 

Regards 



(*) Kudo-me if you really think I helped you!
My plug: I'm doing a Mobile Experiment, reported on my Blog: Check it out!.
---------------------------
Paulo Garcia
http://www.mobilecreators.com - Twitter: http://twitter.com/mobilecreators
Regular Contributor
renaun
Posts: 86
Registered: ‎10-25-2010
My Device: Not Specified

Re: BB playbook offer : MXML vs Air

You can use MXML with just QNX UI components and no Flex. This approach gives you a middle ground, but in the end choosing a framework or set of libraries has many factors to consider (productivity, content, modules, etc...).

 

Here is the forum post specificaly on using QNX components in MXML.

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Using-QNX-components-in-MXML/m-p/...

blog: http://renaun.com
twitter: @renaun
New Contributor
ecstasy2
Posts: 2
Registered: ‎12-10-2010
My Device: Not Specified

Re: BB playbook offer : MXML vs Air

Thanks for the reply.

I now understand better the difference between those two approach and i prefere using AS3 approach as i'm coming from a iPhone/Android native app development.

 

I'm building basicaly a game which will require many custom graphics; i got those graphics in a PSD file.

 

What is the best approach to draw a game on screen and update the differents element!: PS: my game require detecting detecting user touch imput and i don't want to do complex computation of which element the user touched.

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: BB playbook offer : MXML vs Air

hey,

 

im not into really into the game development area but embedding graphics into your classes would probably make things easier. but again dont quote me on that because im not game developer. your best bet is probably doing a google search on adobe air games and tutorials. i've seen several online examples even some using the away3d libraries. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: BB playbook offer : MXML vs Air

You can either load PNG files dynamically from local storage or embed them into the SWF file.  Loading is fast, but not as fast as embedded images. Either case, they get set to the Image class (or Bitmap class if you need to manipulate the image in some low level way).  Each image can listen for events (like mouse clicks).  If you dont want to do that because of image movement, an alternative way is to place a transparent overlay over the whole sceen that will listen for events and then you can maniupate the image underneath.