8 Replies Latest reply on Sep 20, 2009 4:05 PM by bnther

    general glitchy playback

    bnther Level 1

      Here's one for you design experts.

      I drew some telephone poles with powerlines attached using the Flash tools. Then threw in an animated bird with some trees and tweened the whole thing so that the bird looked like it was flying over the woods.  Tested the movie and it was horrible glitchy.  I started taking things off, thinking if I 'lightened' the file a little bit things would smooth out.  I kept taking and kept taking until I was left with just 3 poles and the corresponding powerlines.  I spread the tween out over 800 frames with a frame rate of 60 fps and still it's glitchy.  I'm wondering if I wouldn't be better off not using the flash tools and importing a .png from Photoshop.

       

      Any thoughts?

       

      You can see it here: hxxp://gtwebconcepts.com/Misc/generic

        • 1. Re: general glitchy playback
          kglad Adobe Community Professional & MVP

          are any of those movieclips?  if so, enable their cacheAsBitmap property.

          1 person found this helpful
          • 2. Re: general glitchy playback
            bnther Level 1

            Yes, pretty much everything is this is a MovieClip.  I had never heard of cacheAsBitmap.

            I'm not seeing that as an option in the Symbol Properties panel. Is this only for an AS file?  I did a quick Google on it and came up with movieInstance.cacheAsBitmap = true;  I wasn't using an AS file because I was still trying to work out the kinks.

            • 3. Re: general glitchy playback
              kglad Adobe Community Professional & MVP

              if you click on an on-stage movieclip, in the properties panel is a check box:  use runtime bitmap caching.  check it for all your movieclips and then retest.

              1 person found this helpful
              • 4. Re: general glitchy playback
                bnther Level 1

                Thank you, I did find that but still no luck.

                I put to together another .swf file this morning and the size on it is 3.49k, so I know it's not a big file.  I spread the timeline out 600 frames per movie clip and had the frame rate at 60fps. I selected the runtime bitmap caching and tested the movie.  Still  very glitchy on the powerlines.  It isn't as bad on the first shape but VERY noticable on the staight-lined power poles.  I'm beginning to wonder if Flash is really capable of doing a smooth glide.

                 

                You can see the movie here: hxxp://gtwebconcepts.com/Misc/generic

                • 5. Re: general glitchy playback
                  kglad Adobe Community Professional & MVP

                  i don't use the timeline to tween so i just tried it and saw that if you're not careful each frame you may be moving your object a distance that's not evenly divisible by .05 and more than 1 pixel.

                   

                  in that situation, flash will round (to the nearest .05) to determine where to position your object AND your object will move more than 1 pixel, at least, some of the time.  that's when it appears to "jump".

                   

                  to remedy, either use actionscript to move your object (where it's easy to make whole pixels) or use enough frames that your object moves less than 1 pixel each frame.

                  • 6. Re: general glitchy playback
                    bnther Level 1

                    Didn't know that abou the .05 business. I'll work that this afternoon and see what I can come up with.

                     

                    Many thanks.

                    • 7. Re: general glitchy playback
                      kglad Adobe Community Professional & MVP

                      you're welcome.

                      • 8. Re: general glitchy playback
                        bnther Level 1

                        Now I'm really confused.

                        I put everything in an AS file, tested it and thought that there might be an improvement.  Uploaded it and tried it in Safari.  It didn't look too bad.  There was still some jitter, but I though that it might be a move in the right direction.  Then I tried it in IE and was really surprised.  It was jittering horrible.  Confused, I emptied out the cache and tried it a few more times before I noticed that the wings on the bird were flapping at a different rate than the wings on the bird on Safari.  ?!!  How is that possible?  I thought that Flash ran on it's own thing.  Shouldn't my code be running the same regardless of the browser or even the platform?

                         

                        Here's my code.  Maybe I'm missing something.

                         

                        package{
                           
                            import fl.motion.easing.*;
                            import fl.transitions.Tween;
                            import flash.display.MovieClip;
                            import flash.events.*;
                           
                            public class test6_AS extends MovieClip{
                           
                                public function test6_AS(){
                                    // powerline
                                    var shape2Instance:shape2 = new shape2();
                                    shape2Instance.cacheAsBitmap = true;
                                    shape2Instance.x = 300;
                                    shape2Instance.y = 300;
                                    addChild(shape2Instance);
                                   
                                   
                                    // bird
                                    var birdInstance:mc_birdEditMaster = new mc_birdEditMaster();
                                    birdInstance.cacheAsBitmap = true;
                                    birdInstance.x = 400;
                                    birdInstance.y = 175;
                                    birdInstance.scaleX = .16;
                                    birdInstance.scaleY = .16;
                                    addChild(birdInstance);
                                   
                                   
                                    // function
                                    stage.addEventListener(MouseEvent.CLICK, glitchyMovie);
                                        function glitchyMovie(event:MouseEvent):void{
                                            var slideLeft:Tween = new Tween(shape2Instance, "x", Linear.easeNone, 300, -600, 7, true);
                                        }
                                       
                               
                                }
                            }
                        }

                         

                        hxxp://gtwebconcepts.com/Misc/generic

                        just click on the stage