Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-21-2010, 06:12 PM   #1
mrNoddy
Senior Member
 
Join Date: Aug 2009
Location: London, UK
Posts: 115
Default Rotate around cursor

Hello.

A while ago a saw an AS2 class which faked some 2D physics, it had throw physics in it with bounds which I can move to AS3 easy enough, but the one thing I cant figure out is the rotation. You could grab a rectangular movie clip on one end and 'fling' it around in circles, let go of the mouse and it would fly off and slowly stop, rotation as well as translation.

I don't want to have to use a physics engine for this cheat, I'd like to take that AS2 code and update it. I can't find the thing anywhere, so am asking here.

Any help, pointers would be greatly apprecited.

A.
mrNoddy is offline   Reply With Quote
Old 02-21-2010, 08:19 PM   #2
bocasz
Member
 
Join Date: Dec 2008
Posts: 64
Default

http://www.oscartrelles.com/archives...ation_with_as3

hope it helps
bocasz is offline   Reply With Quote
Old 02-21-2010, 08:58 PM   #3
lordofduct
Senior Member
 
lordofduct's Avatar
 
Join Date: Feb 2008
Location: West Palm Beach, FL
Posts: 3,872
Default

look into matrices... makes a lot of things possible.

Here is my own personal LoDMatrixTransformer class:

http://code.google.com/p/lodgamebox/...Transformer.as


flash cs# comes with one as well in the 'fl' library, I think it's fl.transform.MatrixTransformer or something. It doesn't quite have all the methods I have, but it certainly has the rotateAroundInternal and rotateAroundExternal
__________________
www.lordofduct.com - come read my blog!

If you want to know how to program, take a math class, take a lot of math classes!
lordofduct is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:52 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.