Just a thought.
Maybe try setting the smoothing to the MC the bitmap is loaded into
instead of your bitmap??
Something like this..
http://www.kaourantin.net/2005/12/dynamically-loading-bitmaps-with.html
I used something similar in a mouseWheel controlled "shrink and zoom"
on a Dynamically loaded image and it kept everything smooth,
I dont know about rotating though. But I think it would work fine.
HTH,
Karl
On Sep 3, 2009, at 2:18 AM, Cor wrote:
My guess is that you can't see the difference in this line:
mcBanner2._rotation=-3;
try mcBanner2._rotation=-30; to see if it rotates at all.
And to rotate constantly you need to create a function which runs
continuously with onEnterFrame or timer.
HTH
Cor
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Isaac Alves
Sent: woensdag 2 september 2009 23:59
To: [email protected]
Subject: [Flashcoders] smoothly rotating a dynamic loaded image
with AS2
Hello list, i-d like to smoothly rotate an image loaded in an as2
swf file.
no tween, just rotate and leave it there.
it doesn´t work. i´ve tried lot of things and no success. actually i-m
used to as2, i don´t understand as2 very well.....
here is the code:
mcBanner2.loadMovie(linksBanners[1]);
var bitmap:BitmapData=new
BitmapData(mcBanner2._width,mcBanner2._height,true,0);
var charObj:Object=new Object();
charObj.rotation = -3;
var angle_in_radians = Math.PI * 2 * (charObj.rotation / 360);
var rotationMatrix:Matrix = new Matrix();
// rotationMatrix.translate(-16,-16);
rotationMatrix.rotate(0.1);
// rotationMatrix.translate(16,16);
var rectangleTrans:Transform = new Transform(mcBanner2);
rectangleTrans.matrix = rotationMatrix;
var myColorTransform:ColorTransform = new ColorTransform(0, 0, 1, 1,
0, 0, 255, 0);
var myRectangle:Rectangle = new Rectangle(0, 0, 100, 80);
var smooth:Boolean = true;
bitmap.draw(mcBanner2,rotationMatrix, myColorTransform, "normal",
myRectangle, smooth);
// mcBanner2._rotation=-3; // this doesn´t work.
mcBanner2.attachBitmap(bitmap,100,"auto",true);
mcBanner2._xscale=100;
mcBanner2._yscale=100;
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders