Hi Duccio,
As you said, your component is centered around 0,0. For your effect to work properly, you need to simulate the registration point with modifying the x and y postions of the component. The current version of AP 1.05 doesn't support a setRegistrationPoint method of Rotation. But the Scale class provides one. You could listen to the onUpdate event of Rotation and modify the x and y positions in your onUpdate listener. Look into the source code of Scale for more information about how to simulate a registration point. BTW: The registration point implementation in Scale was a contribution from Ben Jackson and here are other contributions from Robert Penner and Darron Schall: http://www.iterationtwo.com/cgi-bin/mt-comments.cgi?entry_id=73 This is the kind of functionality the upcomming Flex Effects Framework ( announced here http://www.richinternetapps.com/archives/000108.html ) will provide for you. Best, Alex -- Alex Uhlmann Software Engineer iteration::two -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Duccio Sent: 05 May 2005 19:57 To: flexcoders@yahoogroups.com Subject: [flexcoders] Alex Uhlmann: Rotation class help Hi, i'm currently using animationpackage. I have one little problem with the Rotation class, i'm using it to rotate an image but it rotates on its 0,0 axis (upper left corner) and not on its centre as i expected. I looked the documentation but didn't find anything regarding changing the centre of rotation. I 'd like also to thank you again for your great work!!! Below there's the interested code ... Best Regards Duccio Del Ministro public function myMouseDownHandler(event) : Void { trace("mouseDown "+ _indice.valueOf()); if (!_selected) { _alpha=100; width+=1; setStyle("shadowDistance",0); setStyle("dropShadow",false); setStyle("borderSides","left top right bottom"); new Rotation(this).run(360,2000,Quad.easeIn,"onCallback"); } else { _alpha=80; width-=1; setStyle("borderSides",""); setStyle("shadowDistance",4); setStyle("dropShadow",true); my_border.clear(); } _selected=!_selected; } Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/