3 Replies Latest reply on Nov 16, 2009 6:01 PM by andre215

    migration to flex 3 problem..

    andre215 Level 1

      Hi.. Is there anyone know how to migrate properly from flex 2 to flex 3?

      I am trying to migrate my project to flex 3 now, i recompiled all the flex .swf file using flex 3 and put the result into existing development Tomcat application server.

      I am using ant to compile the source code and the compilation is doing fine, but when i try to run the application from tomcat, it always throws errors :

       

      Error #1014: Class mx.core::Application could not be found.

                at flash.display::MovieClip/nextFrame()

                at mx.managers::SystemManager/deferredNextFrame()

                at mx.managers::SystemManager/preloader_initProgressHandler()

                at flash.events::EventDispatcher/dispatchEventFunction()

                at flash.events::EventDispatcher/dispatchEvent()

                at mx.preloaders::Preloader/timerHandler()

                at flash.utils::Timer/_timerDispatch()

                at flash.utils::Timer/tick()             

       

      Our application consists of around 5 different swf.

       

      We are using 'SWFObject' ver 1.4.4 at our 'index.jsp' file which will load my 'mainapp.swf', this 'mainapp.swf' is the main container for other .swf file. It has menu, header and a 'SWFLoader' which will be used to navigate and load other .swf file.

       

      To minimize download time, we are also create Runtime Shared Library which contain some classes that will be shared among other .swf file.

      When I compile my 'mainapp.swf' with this shared library as a library path, my application can run in Tomcat, but this 'mainapp.swf' file size will become very big.

       

      I suspect this is the RSL problem, does anyone have any suggestions about this?? Any suggestions will be appreciate..

       

       

      Thanks,

       

      Andre

        • 1. Re: migration to flex 3 problem..
          Flex harUI Adobe Employee

          This error indicates that none of the RSLs contain the Application class.  Check the link-reports of the RSLs that you are loading.  If you are using Flex 3.2 or later, use the cached framework SWZ RSLs

           

          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          1 person found this helpful
          • 2. Re: migration to flex 3 problem..
            andre215 Level 1

            Hi,

             

            I try to use the cached framework SWZ RSLs..

             

            I add this line to my build.xml script :  

                 <runtime-shared-libraries url="framework_3.2.0.3958.swf" />

             

            I also add 'framework_3.2.0.3958.swf' and 'framework_3.2.0.3958.swz' files to my Tomcat folder, but it still throws the same error.

            Did I do it correctly?

             

            Is there guides to use the cached framework SWZ RSLs  within Tomcat?

             

             

            Thanks in advance ..

            • 3. Re: migration to flex 3 problem..
              andre215 Level 1

              Hi,

               

              Thx Alex for your help and quick reply, I think I have found the problem in my project. Actually we are using swfobject in our index.jsp to call my .swf file.

              We are using parameter when we called our .swf from Tomcat :

                   /app/flex/app.swf?server=http://localhost:8080/app&flexroot=/flex&lang=en_US&jre=1.6.0.11&flashVersion=10.0.32

               

              It's working in Flex2, but when we're using Flex3 it caused "VerifyError: Error #1014: Class mx.core::Application could not be found". My colleage said this is URLEncode problem and I have to replace '/' with '%2F'  and ':' with '%3A'. So we have to use syntax like :

                   /app/flex/app.swf?server=http%3A%2F%2Flocalhost%3A8080%2Fapp&flexroot=%2Fflex&lang=en_US& jre=1.6.0.11&flashVersion=10.0.32

               

              The strange thing is, why it's working in Flex2.. Thanks again for your help

               

               

              Andre