15 posts
  • Exclusive Author
  • Has been a member for 3-4 years
MaximusCript says

Hello, its me again.

I searched all over the web, but i couldn’t find answear to this issue… And i ran out of ideas too.

So i got an animation of JPG picture, that is jumping at the end of Tween. Here’s link

I presume that problem is related with picture rendering. Here’s list of some things,(that i still remember) i did:

- I tried this animation with one picture - I checked this animation on some VERY powerfull computer, with good graphics card too. But jumping effect was still there. And CPU usage was even lower then with 360p videos on youtube. - I tried this animation with lowest possible image quality (0 in photoshop JPG save mode) - I tried with different image resolution (72 and 36), still no effect. - I tried to set BitMap.PixelSnapping = PixelSnapping.NEVER and all other options. NO effect. - Embeding image inside movie and making BitMap instances = no offect. - Loading from disk/web no effect - Allow smoothing / 100% quality from embedded JPG = no effect

I got on some clue anyways. When i try this animation with simple objects (rectangles, and some brush dots, lines) i get some jumping too!

To be exact only STROKES are jumping. Somewhere i read one day, that strokes must always be set on half pixel’s like 1,5 / 54,5 / 99,5 etc.

Any suggestions please?

PS: Does anybody knows how Bitmaps are rendered in Flash? A link to a lecture perhaps?

3671 posts Community Moderator
  • Has been a member for 5-6 years
  • Contributed a Tutorial to a Tuts+ Site
  • Netherlands
  • Community Moderator
  • Envato Studio (Microlancer) Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
+4 more
Joost Volunteer moderator says

Moved your thread – the Site Feedback section is for feedback on this site, the Envato marketplaces ;)

15 posts
  • Exclusive Author
  • Has been a member for 3-4 years
MaximusCript says

Sorry Joost, my bad.

Hey i think i found a solution to that!

All i needed to do is add few lines of code:

var up:Bitmap = new Bitmap(new Picture);
var down:Bitmap = new Bitmap(new Picture);

up.pixelSnapping = PixelSnapping.NEVER;
down.pixelSnapping = PixelSnapping.NEVER;

up.smoothing = true;
down.smoothing = true;

up.scaleX = up.scaleY = down.scaleX = down.scaleY = 0.999;

upHolder.addChild(up);
downHolder.addChild(down);

startAnimation();

I just read somewhere on internet, that image’s automaticly snaps to full pixel, and only changing it’s pixelSnapping property to NEVER won’t make it. You also have to change scaling to something diffrent then full 1.

Hope it will help someone, someday… Bye.

by
by
by
by
by
by