5 Replies Latest reply on Aug 11, 2011 12:32 PM by eegz

    Tabs in a mobile application

    eegz

      I have a large application structured such that I can compile as AIR or Flash by pushing almost everything into a common library file.

       

      This is great for AIR and Flash, but trying to build a mobile app with FlashBuilder 4.5 gives me the following error:

           VerifyError: Error #1014: Class mx.containers::ViewStack could not be found.

       

      How do I make my tabbed application work in a mobile build (and still work for AIR and Flash)?

        • 1. Re: Tabs in a mobile application
          Don Kerr Level 3

          couple choices:

          1) covert your project to Flex Mobile Project and use the mobile View-based design with TabbedViewNavigator components.  Significant amount of work for large apps.

          2) convert your project to Flex Mobile Project, and add the mx.swc library to it. (mobile projects don't include mx)  This will allow mx components to work, although not necessarily "optimized" for mobile.  I do this with mx:Accordion and mx:TabNavigator now on tablet apps and it works fine. mx.swc is located in your SDK folder.

           

          Pick the parts of your large app that make sense to use on mobile.  Leave the rest on web/desktop version.

           

          Hope this helps.

           

          Don

          • 2. Re: Tabs in a mobile application
            eegz Level 1

            Thanks for the reply Don.

             

            I tried the mx include thing, but my app is almost entirely spark.  When I do the mx include I get a bunch of "1172: Definition mx.skins.spark:<skin name>" could not be found errors.

             

            The entire app needs to work on AIR, Flash and Mobile there isn't any component that is specifically mobile or not mobile.

             

            I just want to have tabs in my app to show or hide viewstacks, I'm not looking to switch between different applications.

             

            About the only thing I can see as a solution is to create my own tabs by just have a bunch of buttons that show or hide groups (replacement for viewstacks).  Not great, but I'm not seeing another way to do this.

            • 3. Re: Tabs in a mobile application
              Don Kerr Level 3

              add the sparkskins.swc too.  Forgot to tell you that you need this one too.  Sorry.

               

              mx.swc and sparkskins.swc are only for the option to use your existing web/desktop navigators.

               

              Otherwise, you will need to rearchitect your app to a true mobile TabbedViewNavigator or ViewNavigator.  Nothing quick about converting one to another. We're not quite there with true multi-screen.

               

              Don

              1 person found this helpful
              • 4. Re: Tabs in a mobile application
                eegz Level 1

                Thanks much.  That got me further.

                 

                 

                Now I'm seeing the following:

                 

                 

                VerifyError: Error #1053: Illegal override of playExternal in com.wd.ui.commonComponents.AudioManager.

                    at flash.display::MovieClip/nextFrame()
                    at mx.core::FlexModuleFactory/deferredNextFrame()
                    at mx.core::FlexModuleFactory/update()
                    at mx.core::FlexModuleFactory/timerHandler()
                    at flash.utils::Timer/_timerDispatch()
                    at flash.utils::Timer/tick()


                ReferenceError: Error #1065: Variable _class_embed_css_Assets_swf__1892995414___brokenImage_1061250739 is not defined.

                    at flash.display::MovieClip/nextFrame()
                    at mx.core::FlexModuleFactory/deferredNextFrame()
                    at mx.core::FlexModuleFactory/update()
                    at mx.core::FlexModuleFactory/timerHandler()
                    at flash.utils::Timer/_timerDispatch()
                    at flash.utils::Timer/tick()


                ReferenceError: Error #1065: Variable _class_embed_css_Assets_swf__1892995414_mx_skins_cursor_BusyCursor_84810851 is not defined.

                    at flash.display::MovieClip/nextFrame()
                    at mx.core::FlexModuleFactory/deferredNextFrame()
                    at mx.core::FlexModuleFactory/update()
                    at mx.core::FlexModuleFactory/timerHandler()
                    at flash.utils::Timer/_timerDispatch()
                    at flash.utils::Timer/tick()

                 

                 

                Any ideas what might be happening here?

                • 5. Re: Tabs in a mobile application
                  Don Kerr Level 3

                  Sorry. I've never seen this before.  I've only had to include mx and sparkskins to get mobile projects working with mx components.

                   

                   

                  Don