3 Replies Latest reply on Aug 18, 2011 11:51 AM by makc3d

    Bug in Flash CS5 - 3D rotation in Compiled Clips


      I have found a bug in flash CS5, I was wondering if anyone else had this?

      This bug occurs in Flash CS5 when creating compiled clips which use the 3D rotation tool. It appears that if you attempt to convert a symbol which contains a 3D transformation to a compiled clip it will not work correctly. What makes this problem worse is that the error is not reported correctly and so it is nearly impossible to debug.


      Steps to reproduce:


      1, create a new blank AS3 project.


      2, Create a new symbol, call it "sym1", and place a rectangle shape in it.


      3, create another symbol, call it "sym2", and place "sym1" into it.


      4, Now, while you are still editing sym2, select the instance of sym1 and go to the 3D rotation tool - apply a 3d rotation to sym1.


      5, Now right-click on sym2 in the library and go to "convert to compiled clip", note the warning:


      "Warning: 5002: The main timeline's frame scripts have been ignored because a compiled clip contains a definition for fl.livepreview.LivePreviewParent. To override the fl.livepreview.LivePreviewParent definition, place a custom class file within your classpath."


      As you can see this warning message does not describe the problem accurately. Unfortunately it is easy to accidentally add a 3d rotation to a symbol without knowing it. This has been a major issue for us and we had to spend several days tracking down the problem.


      Anyone else have this problem or know how to get around it to enable 3D rotation in compiled clips?



      ** Update **

      I have just had a similar problem with the new TLF text in compiled clips. If we try and convert a compiled clip which contains TLF text, it throws the following warning:


      "Warning: No libraries were linked as Runtime Shared Libraries (RSLs) because of your publish settings: Compiled Clip"




      Added TLF text update.

        • 1. Re: Bug in Flash CS5 - 3D rotation in Compiled Clips

          The good news for you is that these two warnings are indeed just that: warnings. They are not errors, and in both cases your operations should actually have completed successfully, at least mostly.


          The warning you are getting with 3D used in a symbol that you convert to a compiled clip definitely seems like a bug. What is happening there is that normally when we export 3D, we add some automatically generated ActionScript at the document level setting up the transform.perspectiveProjection. When you export a compiled clip, it attempts to add that code to the LivePreviewParent class, which it cannot do, and which isn't really what you want anyways.


          So the only real problem you get with 3D in compiled clilps is that if you ONLY have 3D in compiled clips (and not in any ordinary symbols) then the perspectiveProjection will not be set up correctly. The easiest way to fix this is to make sure that you have SOME 3D somewhere on stage which is NOT in a compiled clip. It could be something very small and simple that is offstage, it could even be something that is just on one frame and is on a frame that you never actually PLAY, but without some 3D that is outside of a compiled clip, you won't get the perspectiveProjection set up correctly.


          As for the TLF issue, that is not a bug and is an expected warning, although it is a bit cryptic so apologies for that. If you click the ActionScript Settings button in the document PI and go to the Library Path tab, you should see down near the bottom that Default linkage is set to Runtime shared library (RSL), which means that by default the TLF implementation will be downloaded at runtime as an RSL. However for compiled clips at this time the automatic download of RSLs isn't working correctly, so if you make a compiled clip with TLF, then you end up effectively changing this setting to be Merged into code, and this warning is just trying to tell you that.


          This is a bit of a concern, because the TLF library is not a small thing, and you would rather download it as an RSL. The TLF RSL is signed by adobe as a SWZ file, which means that the flash player can cache it across all applications that use it. So the idea is that even though you are downloading it as an RSL, it is unlikely that you will actually need to wait for it to download, because the user has probably hit another site that used it already. So really it is ideal if you can avoid putting TLF in compiled clips and therefore leverage the RSL, but if you cannot then everything should still work fine for you, you will just have a larger SWF file.


          Hope those explanations made sense!

          • 2. Re: Bug in Flash CS5 - 3D rotation in Compiled Clips
            gregdenness Level 1

            Hi Jeff,


            Thanks very much for the explainations!



            • 3. Re: Bug in Flash CS5 - 3D rotation in Compiled Clips

              I wrote a little script to find those pesky rotated objects for me:


              import flash.display.DisplayObject;
              import flash.display.DisplayObjectContainer;
              import flash.utils.getQualifiedClassName;
              function info (o:DisplayObject):String {
               return o.toString () +
                " " + o.name +
                " (" + o.x + ", " + o.y + ")" +
                " " + getQualifiedClassName (o);
              function check3d (o:DisplayObject):void {
               if (o.transform.matrix3D != null) {
                trace (info (o), "parent chain:");
                var p:* = o;
                while (p.parent != null) {
                 p = p.parent;
                 trace ("\t" + info (p));
               if (o is DisplayObjectContainer) {
                for (var i:int = 0; i < DisplayObjectContainer (o).numChildren; i++) {
                 check3d (DisplayObjectContainer (o).getChildAt (i));
              check3d (this);

              But you need to drag all the library on stage