Have you downloaded the latest Flash Builder 4.5 from pre-release (and if you haven’t, what are you waiting for?!) and tried to import a project you built in Flash Builder Burrito only to find a bunch of errors? I made a list of things I discovered when going through this process and noted them below. Please comment here if you have any to add that I have missed so others can get up to speed quickly.
- spark.components.MobileApplication is now spark.components.ViewNavigatorApplication
- spark.components.TabbedMobileApplication is now spark.components.TabbedViewNavigatorApplication
- spark.components.MobileIconItemRenderer is now spark.components.IconItemRenderer
- FlexEvent.REMOVING is now ViewNavigatorEvent.REMOVING
- spark.components.supportClasses.MobileTextField is now spark.components.supportClasses.StyleableTextField
- The sessionCachingEnabled property on the root application tag for enabling data persistence is now persistNavigatorState
- FlexEvent.APPLICATION_PERSISTING is now FlexEvent.NAVIGATOR_STATE_SAVING (for custom persistence handling)
- FlexEvent.APPLICATION_RESTORING is now FlexEvent.NAVIGATOR_STATE_LOADING (for custom persistence handling)
- spark.effects.ViewTransition is now spark.transitions.ViewTransitionBase
- spark.effects.SlideViewTransition is now spark.transitions.SlideViewTransition
- lineBreak is no longer a property on the Spark DataGrid
- Default mobile theme colors have changed. The prior builds had a dark theme, so if you coded any specific colors around this theme you will have to change them because your UI will likely look funky.
Download the 2.6 version of Adobe AIR Launchpad from this link if you are using the Flash Builder 4.5 pre-release. It will generate projects that will work with the pre-release and the soon to be released official Flash Builder 4.5.
Excellent ! I was hoping that Launchpad update would not take too long to come.
Thanks !
Excellent ! I was hoping that Launchpad update would not take too long to come.
Thanks !
You saved the day. Thank you!
When you change the MobileIconItemRenderer be sure to change the ‘decoratorClass’ to ‘decorator’
Minor pain in the a** having to alter the minor things especially when working on a large application with many views. Thankfully the debug facility makes it an easier task.
Great! Thank you very much! I am just working on this parts.
Hi Holly,
This is what I was looking for. I have a quick question, hope I get the solution.
See, I’m using FB Burrito to build some simple mobile apps. I have downloaded the Flex 4.5.0.19786 SDK and configured it in my IDE. However still I’m not able to build TabbedMobileApplication or TabbedViewNavigatorApplication. Is it available in that SDK ? or should I use FB 4.5 to get the full fledged features?
Thanks,
Nathan
Hi Nathan! You should definitely get the latest released version of Flash Builder 4.5. Besides getting the latest SDK with it, you will want that new Flash Builder 4.5 IDE version over the Burrito version, it’s much improved
Thanks! Holly
Thank you so much Holly.
Gonna play with FB 4.5 ..
What is the replacement for ‘returnedObject’ property?
Hi Wim, There is a navigator.poppedViewReturnedObject() with an object type of ViewReturnObject that is returned from the popped view when you override the createReturnObject() in your view. Is that what you’re looking for? Thanks! Holly
That is it! Thanks.
One more: ‘navigator.landscapeOrientation’ ?
Hi Wim, sounds like you might need:
stage.setAspectRatio(StageAspectRatio.LANDSCAPE);
for the landscapeOrientation replacement…
To clear the navigation stack you can use navigator.popAll();
Hope that helps!
Holly
Hi,
I wanted to read the property, not set. I have found that you can use:
stage.deviceOrientation
This returns one of the constant strings in StageOrientation.
navigator.popAll() indeed clears the stack, but it also visually changes the view. I wanted a method to keep the current view, but clear the history so that the backbutton would not go back. I have worked around it now by using ‘replaceView’ so I don’t need to clear the stack anymore.
Thanks for the help.
And ‘navigator.navigationStack.clear()’ ?
I tried ‘navigator.navigationLayout.clearVirtualLayoutCache()’, but that gives me a NullPointerException
FlexEvent.VIEW_ACTIVATE –> ViewNavigatorEvent.VIEW_ACTIVATE, and
FlexEvent.VIEW_DEACTIVATE –>
ViewNavigatorEvent.VIEW_DEACTIVATE
Anyone knows about Button.icon? Got an error, but not sure what to change to.
Try the iconDisplay property on Button…
iconDisplay does not allow you to use a Class as icon.
I think this should work instead:
myButton.setStyle( “icon”, myIconClass )
Hi Wim, yes that is true, you would need to specify the URL to the icon as the source of a BitmapImage for iconDisplay, such as versus using a Class:
Just depends on your needs… sounds like you have your solution!
Thanks!
Holly
I have installed the new SDK in my flash builder burrito but now I can’t make apk files anymore.
When I click export release build the screen opens. I hit next but when I then click finish nothing happens. He doesn’t make my apk file.
Someone a solution?
Kind regards.
I get errors on the mx.controls.Alert buttons when I try to compile under the newly downloaded Flash Builder 4.5. Do you know of any alternatives for displaying a popup message to the user when building a Mobile App?
Hi Greg! Take a look at the Spark SkinnablePopUpContainer. I have a sample I will put up here on my blog tonight or tomorrow. Thanks!! Holly
Thank you very much!!! I saw your new entry. This is exactly what I was looking for…
Hi Holly! Thanks for putting this information together – really helpful (saved me a ton of work).
One issue I’ve been struggling for a couple of days is that my application built with Burrito opens well with 4.5, builds ok, and I can debug it using the desktop simulator (not the one running on VMware). But when I open a mxml file in design mode, I receive the error: An unknown item is declared as the root of your MXML document.
Could the fact of having my MXML using be a problem? If not, any guidance on what to look for would be greatly appreciated.
Thanks!
Will
Hi Will! Are you still having this problem? If so can you paste in the root MXML of the file you’re trying to open in design mode? Thanks much! Holly
Thanks for all the help here. thats awsome.
But its really lame of Adobe to cause all these problems , I am up to my neck in errors caused by migrating from burrito to FB4.5 . Adobe really have **** this time.
Hi,
Thanks for this post. It helped a lot. I have one question, can we still use the old sdk in burrito to run in flash builder 4.5? my project was done in burrito and migration to flash builder 4.5 is ok, but all the layout screwed. i have tried using the old sdk but it doesnt seem to work, maybe you have some suggestions. Thank you..
Hi Jed, can you show me a screenshot of what you mean with the layout? I would also suggest moving into the latest versus staying on the burrito SDK… Thanks! Holly
Hi Holly, thanks for the reply. Actually i used MobileTextField a lot in my application and when i upgrade, it seems the dimensions were changed that’s why my layout screwed( labels etc. ). I guess ill just need to solve all this issues one by one. i dont have a choice but to upgrade to the latest. but is it really faster compared to burrito? Thanks Jed..
Thank you for this article.
It’s jus what a needed.
Just wanted to point out another property they’ve removed:
textAlign is no longer a property of the Spark RadioButton
Thankfully my project had only a few errors when upgrading, but this post certainly helped ease the transition a bit anyway! Thanks!
Hi Holly Schinsky
I am using the flash builder 4.6, the error is the “the definition mx.controls.Alert could not be found” Could you help me how to solve it.
thanks advanced
Hi Johnny, the Alert control is not available to be used in mobile applications. Instead, you can use something like noted in this post: http://devgirl.org/2011/06/07/flex-4-5-mobile-development-alert-popup-and-other-skinnable-popups-with-source-code/
Thanks!
Holly