22 Replies Latest reply: Sep 10, 2012 9:59 AM by sinious RSS

    MovieClip disappear and reappear?

    Hec63 Community Member

      Hi,

       

      On a 3D scene a have some MovieClip container disappearing randomly after a while and reappearing when I rotate de scene.

      Using CS6 AS3 Air 3.2.

       

      -No memory leak

      -fps good

      -Object still on display list

      -Tried whitout transparency no lock

       

      If you have any clue please help,

       

      Thanks,

       

      CaptureTest1.JPGCaptureTest2.JPG

        • 1. Re: MovieClip disappear and reappear?
          kglad MVP

          is its z property changing so it's behind those walls and floor?

          • 2. Re: MovieClip disappear and reappear?
            Hec63 Community Member

            No,  the walls and floor are in the 3Droom containner as well as the cabinets and they all rotate with the z and they are not render behind th walls.

            • 3. Re: MovieClip disappear and reappear?
              kglad MVP

              nevertheless, i think you most likely have a clipping issue (or you're doing something to cause the problem).

              • 4. Re: MovieClip disappear and reappear?
                Hec63 Community Member

                No, I tried without clipping and no sorting,  still disapearing.  If I put some cabinet it will disappear from the screen after a while without moving the mouse or doing anything.

                As soon as I do a z rotation its reappering.  The cabinets are selectable and when its not visible its still selectable and when I select it its showing back.

                 

                Could it be something about the GC? because its doing it randomly.

                • 5. Re: MovieClip disappear and reappear?
                  kglad MVP

                  no, it can't be gc'd unless it's removed from the display list.

                   

                  setup a loop that repeatedly traces that objects x,y,z,visible and stage properties and see if anything changes when it disappears.

                  • 6. Re: MovieClip disappear and reappear?
                    Hec63 Community Member

                    Test done ,the object is still at the same x,y,z  place, its not moving.

                     

                    The objects are in an array could it be lost on the displayList.?

                    • 7. Re: MovieClip disappear and reappear?
                      kglad MVP

                      what about visible and stage properties?

                       

                      and, is there any code anywhere in your app that can cause any object to not be visible?

                      • 8. Re: MovieClip disappear and reappear?
                        Hec63 Community Member

                        No visible propreties on the object and I turned off all other visable (Walls) .

                        Stage properties are set in Air panal FULL_SCREEN  and Landscape and I tried all render mode.

                         

                        Could it be Bitmap size or scaling limitation on the cabinets because only the cabinets are disappearing?

                        • 9. Re: MovieClip disappear and reappear?
                          kglad MVP

                          there are bitmap size limitations but those would not cause a bitmap to disappear and reappear.

                           

                          stage is a property of all displayobjects.  when an displayobject is in the display list, its stage propety is the [object Stage].  when its not in the display list, its stage property is null.  you should check if that cabinet's stage property is null when it disappears.

                           

                          are you using a 3d (or any other framework)?

                          • 10. Re: MovieClip disappear and reappear?
                            Hec63 Community Member

                            trace("_GLOBAL.BASEMOD[1] = " +_GLOBAL.BASEMOD[1].stage);

                            //_GLOBAL.BASEMOD[1] = [object Stage]

                             

                            I'm not using a 3D engine its only flash.

                            • 11. Re: MovieClip disappear and reappear?
                              sinious MVP

                              Try changing the 3d scene itself. Duplicate the offending 3d object and see if both instances disappear.

                               

                              What format are you using for the 3d scene?

                               

                              How complex are the 3d models? Have they been optimized to remove excess/unnecessary vertices?

                              • 12. Re: MovieClip disappear and reappear?
                                Hec63 Community Member

                                If I duplicate the object both disappear.

                                 

                                3D scene is a Sprite _GLOBAL.Monde3D

                                 

                                The cabinet's are complex but even with simple cube like a fridge it still disappear.

                                 

                                What do you mean by remove excess/unnecessary vertices?

                                 

                                Could it be filtering or transparency? I notice that the moving curseurs (red dot a the bottom) still there when I maded test without transparency.

                                 

                                 

                                CaptureTest5.JPGCaptureTest3.JPGCaptureTest4.JPGCaptureTest6.JPG

                                • 13. Re: MovieClip disappear and reappear?
                                  kglad MVP

                                  that trace repeatedly executes and show [object Stage] even after that object disappears?

                                  • 14. Re: MovieClip disappear and reappear?
                                    Hec63 Community Member

                                    Yes, and never trace null  _GLOBAL.BASEMOD[1] = [object Stage]

                                     

                                    addEventListener(Event.ENTER_FRAME,Refresh);

                                    function Refresh(event:Event):void {

                                            if (_GLOBAL.BASEMOD[1]!=null){ trace("_GLOBAL.BASEMOD[1] = " +_GLOBAL.BASEMOD[1].stage);}

                                         }

                                     

                                    If I delete the object without _GLOBAL.BASEMOD[1]=null; than trace is _GLOBAL.BASEMOD[1] = null

                                    • 15. Re: MovieClip disappear and reappear?
                                      sinious MVP

                                      What is the target of this, desktop, web or mobile? If desktop or web have you tried viewing it on another machine to verify it's not a video card related issue? I presume you're using direct acceleration with depthAndStencil?

                                      • 16. Re: MovieClip disappear and reappear?
                                        Hec63 Community Member

                                        I tested on android tablet and on other computers, no lock.

                                         

                                        This will be for desktop and mobile.

                                        www.udesignit.ca

                                        • 17. Re: MovieClip disappear and reappear?
                                          sinious MVP

                                          Not specific to Flash but to OpenGL, the only time I've seen any significant issues with objects disappearing is when multiple 3d objects exist in the same 3d space. The only real way to verify if that's the issue is to make an object you're absolutely sure no overlapping exists in. Even if you draw a few dozen cubes with textures on them and make them a single object and it works (doesn't disappear) you might have an issue similar to that.

                                           

                                          The reason that is an issue is there are faces to all 3d objects. Unless you specifically select a face and mark it as a 2-sided face, only one side of a 3d mesh is ever visible. When 2 objects are in the same exact place, one may be pointed backwards and the GPU is simply not drawing the reverse side of the face. But that usually makes "parts" of a 3d model disappear, not really the whole model. Food for thought.

                                           

                                          You may want to try a simple test on a 3d framework. What 3d software do you use? I know it might not be advisable or practical to start rebuilding this all in a new framework but if you convert your model to a collada, 3ds or obj and import it directly into a framework and it displays perfectly, it may be worth using. I like Flare3D, Away3D and Alternativa3D myself. Some frameworks have plugins to convert 3d models to their own format (like Flare3D's f3d format). Sometimes just converting geometry to another format can solve an issue. You may even be able to convert your objects to OBJ and then back to their original format and solve the geometry issue. That has worked for me in the past.

                                          • 18. Re: MovieClip disappear and reappear?
                                            Hec63 Community Member

                                            I need interactif MovieClip with timeline on plane, all the engine I tried are not working well.  And basically those framework are flash.

                                             

                                            OK, by looking back on my demo I did it without disappearing.

                                            http://www.youtube.com/watch?v=KlJH45A5ANI&feature=player_detailpage

                                             

                                            The only difference is that cabinet's are in an Array. I Made a test without the array and it works.

                                             

                                            But I need the array,  I'll make some more test.

                                            • 19. Re: MovieClip disappear and reappear?
                                              Hec63 Community Member

                                              Hi,

                                               

                                              Working find with flash player 11.2 (little white spots, but no disappearing). 

                                              No luck with Air 2.5 to 3.4 with all render mode possible, still disappearing.

                                               

                                               

                                              What is the difference on the render between flash 11.2 and Air 3.2 ?

                                              • 20. Re: MovieClip disappear and reappear?
                                                sinious MVP

                                                Was the array a Vector? Was it class-level?

                                                • 21. Re: MovieClip disappear and reappear?
                                                  Hec63 Community Member

                                                  Array are MoviClip class

                                                   

                                                  //Array Fridge

                                                  BASEMOD[CABNbr]=new MovieClip();

                                                   

                                                       COTED[CABNbr] =new FrigoC1_mc();

                                                       COTEG[CABNbr] =new FrigoC1_mc();

                                                       PORTES[CABNbr]=new Frigo_mc();;

                                                       BACK1[CABNbr] =new BackCab_mc();

                                                       DESSOUS=new DesBase_mc();

                                                       TOP=new Top_frigo1_mc();

                                                   

                                                  BASEMOD[CABNbr].addChild(BACK1[CABNbr]);

                                                  BASEMOD[CABNbr].addChild(DESSOUS);

                                                  BASEMOD[CABNbr].addChild(COTEG[CABNbr]);

                                                  BASEMOD[CABNbr].addChild(COTED[CABNbr]);

                                                  BASEMOD[CABNbr].addChild(TOP);

                                                  BASEMOD[CABNbr].addChild(PORTES[CABNbr]);

                                                   

                                                  Room.addChild(BASEMOD[CABNbr]);

                                                  • 22. Re: MovieClip disappear and reappear?
                                                    sinious MVP

                                                    While you can iterate through the display list and that can confuse you by similarity, that's not an array, that's just a MovieClip.

                                                     

                                                    Completely off-topic I'd stay away from using punctuation in a class name and stick to camel notation. Underscores are fine in variable names and people got used to them in instance names in flash but for example FrigoC1_mc should be FrigoC1MC. It helps quite a bit in determining if something is a class or an instance or variable name just by looking at code. But that's a side note.

                                                     

                                                    I see no issue with what you're doing and even though it doesn't disappear in 11.2, if white spots are appearing, it's still not working.

                                                     

                                                    I suspect the 3d models and materials are the underlying issue. I've already mentioned my recommended path. Create an object you're sure has no front/back faces in the same position and see if it disappears, or try a 3d framework and see if their object formats give similar results. I've never seen this happen in Flare3D, Alternativa3D or Away3D.