;

PDA

Click to See Complete Forum and Search --> : Animation causes screen "tearing"


Trefor
09-05-2007, 08:13 AM
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

joshstrike
09-05-2007, 11:50 AM
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...?

5TonsOfFlax
09-05-2007, 12:14 PM
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.

Trefor
09-11-2007, 04:26 AM
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?

5TonsOfFlax
09-11-2007, 12:20 PM
You can apply it with script. Simply put

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.

>flashl!ght<
09-11-2007, 05:21 PM
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.

Trefor
09-12-2007, 04:25 AM
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.

5TonsOfFlax
09-12-2007, 10:26 AM
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?

senocular
09-12-2007, 10:52 AM
also see
http://www.kirupa.com/forum/showpost.php?p=2175079&postcount=4