3 Replies Latest reply on Aug 24, 2007 8:08 AM by kamckng

    Slow animation for some reason

    kamckng Level 1
      Can anyone help me out here... I have a crane game i'm making, moving the crane around works fine... when you move the crane back far enough it is going to hit the cabin of the crane, break the glass, and the cabin should shake. the problem is, i just use a setInterval to rotate the cabin a couple degrees a few times, but it goes REALLY slow when it should change ever 35 milliseconds... the only reason i can think of for this is that maybe there are too many movie clips inside the cabin movieclip... but... i went in and just tried rotating the cabin frame movieclip inside the cabin movieclip and it was still slow... i also tried to use keyframes in the timeline of the movie clip and it was still slow even though the movie is at 24 fps... anyway.. for the game for the source

      can someone please look at it and tell me what might be going on? the code for the crane moving backward is at line 365.
        • 1. Slow animation for some reason
          I will say that when I ran this with a performance monitor turned on that it spiked my processor to 97% ,when the crane hits the glass, and it stays spiked until I close the window. Your assumption of perhaps too much going on in one mc may be accurate.
          • 2. Re: Slow animation for some reason
            kamckng Level 1
            yeah, that's what i thought, i jsut can't figure out why... i did notice however that the images i am using were made in freehand... then just copied and pasted into a flash file... when i double-click them... i can dig down like 10-20 layers sometimes in all the groups that it has... could that be a problem? does anyone know a way to flatten it all out into just one group/layer or something?
            • 3. Re: Slow animation for some reason
              kamckng Level 1
              FYI in case anyone was/is wondering.. this problem was apparently caused by the gradients that were imported form freehand... contour gradients do NOT work well in flash.. they were changed to linear gradients and it works fine now :)