There are two things wrong with that example:
One, the square image you have has an outline. Because of the way Flash
renders outlines, it'll always snap perfectly vertical and horizontal
lines to the pixel, hence producing what looks like a hard bitmap move.
In fact, if you cut a diagonal line on the square and try to move it,
you'll notice only the vertical and horizontal sides will "snap", which
is pretty odd (but expected behavior). Turning on "stroke hinting"
actually forces this same behavior for all lines.
And two, you turned on bitmap caching ("use runtime bitmap caching") for
the object, which forces it to render as a bitmap on round pixels and
then transfer to the screen. Your object acts like a bitmap with
smoothing/antialias off.
So if you turn bitmap caching off and remove the outline and it'll work.
Check it out:
http://hosted.zeh.com.br/misc/test.swf
These techniques are only good for this example scenario though, which
probably isn't the problem that you're facing on your actual work
(specially if you're using images or text), so you'll have to test to
see what's up with your specific case.
But what I can tell you is, don't use runtime bitmap caching as default.
Not only because it'll force your renders to be based on the pixel most
of the times, but because it'll mess with your movies in a number of
different ways like forcing a large use of memory and garbage collection
when not needed. Don't get me wrong, it's a great feature to have, but
it has to be used sparingly and there's a reason why it's off by default.
Zeh
sebastian wrote:
ok I don't normally ask this, but I have made a very simple test flash
file with just one vector graphic and with Tweener I am moving it across
the screen; it doesn't move smoothly.
The code you will find in my flash file is just this:
package {
import flash.display.MovieClip;
import caurina.transitions.Tweener;
//main timeline AS file:
public class testas extends MovieClip {
public function testas () {
setAnimation2 ();
}
private function setAnimation2 () {
Tweener.addTween (testMC, {x:-1800, time:8000,
transition:"linear"});
}
}
}
the file with my FLA, which like I said has only one vector-item of a
square on the timeline is:
http://www.fountain-city.com/archives/test/testMotion.zip
Can anyone help me fix this?
Much appreciated!
thanks!
seb.
sebastian wrote:
also I tried replacing my PNG with a simple vector of a square, but it
STILL skips as it moves every pixel... surely I am still missing
something simple here...
hmmm
sebastian wrote:
Thanks Jack and Zeh,
I have the bitmap smoothing on on the image's properties in the
library, and I also turned on for every MC it is placed in 'use
runtime bitmap caching' but i STILL get staggered movement...
:(((
It's nothing complicated, aside from using the Tweener AS3 class, I'm
trying to move PNG's [with transparencies] over a BG image. The blend
mode on all layers is set to 'normal'. No alpha is being used except
for the inherent PNG's alphaness. I've also tried setting the
bitmapCaching at runtime to the holding MC, but none of this is
helping...
Any other suggestions? Am I still missing something? Is the PNG the
problem?
Thanks,
Sebastian.
Zeh Fernando wrote:
I have tried basic timeline motion tween, and also the AS3 Tweener
class; but in both cases I get the issue that the slow animation
makes the image do little 1 pixel jumps that are VERY visible and
break the effect I am going for [which needs to be extremely subtle].
If that's an image, set its anti-alias to antialias for animation.
If it's a bitmap, turn on smoothing on it (on the library). If it's
a loaded bitmap, turn on the Bitmap's antialias.
Zeh
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders