A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Animation causes screen "tearing"

  1. #1
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328

    Animation causes screen "tearing"

    Hi

    Have had this problem mostly when i have used imported png's but have just built a file that has loots of objects moving left to right in a kind of scrolling menu. Each object is drawn in flash and has an imported swf logo inside it.

    When i use the menu there is a hell of a lot of screen tearing going on. Does anyone know how to minimise this unwanted effect?

    Thank you

  2. #2
    Senior Member joshstrike's Avatar
    Join Date
    Jan 2001
    Location
    Alhama de Granada, España
    Posts
    1,136
    What do you mean by "tearing"?
    Is this all part of one Flash movie or do you have a lot of little flash movies on the page being moved around with javascript or something...?

  3. #3
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    The only thing that comes to mind that might cause tearing is a mismatch between the redraw rate and the frame rate. Are you drawing at the bitmap level?

    Some things to try would be to make sure your imported swfs have the same framerate as the containing swf, or if they are not animated, use cacheAsBitmap.

    If you are drawing at the bitmap level using a Timer object to periodically redraw a bitmap, then you'll definitely want to match the Timer to the movie framerate.

  4. #4
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    Thanks for the reply.

    I'm pulling in swf files from an xml and placing them in a kind of semi transparent holder clip which moves over a gradient background. And yes I am aware I am asking for miracles wanting flash to handle it smoothly.

    The imported swf do not have animation so I didnt think the frame rate would be a problem, I had though flash automatically uses the main files framerate. But anyway I have used onEnterFrame to set up my timer so framerate should be ok.

    The effect actually isnt so bad when running from the flahs player but int he browsers it isnt too nice.

    So the cashasbitmap can i apply this with a bit of script or would I have to export each swf with the check box ticked?

  5. #5
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    You can apply it with script. Simply put
    Code:
    mc.cacheAsBitmap = true
    where mc is the loaded swf. Beware, if you rotate it or draw into it, this may actually hurt performance instead of help. But if you're just moving the static clips around, it should be much faster.

  6. #6
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    Also set allowSmoothing to true for any bitmaps you have(you do this in the library). It makes a huge difference when animating bitmaps.

    Beyond that, Flash has pretty bad render sync and you are always bound to get some tearing in Flash animation no matter what you do.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  7. #7
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    Thanks for your help.

    Nothing seems to fix it so putting this down to the flash renderer and will avoid this type of anim in the future.

  8. #8
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    I went to the site you sent me via pm and did not see the problem you refer to. Maybe you should see whether other users see an issue?

  9. #9
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,358

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center