tag:blogger.com,1999:blog-4698512362740560993.post2182080440718725843..comments2022-05-22T11:09:24.623+01:00Comments on Dan's Interactive Media Pages: Click and drag rotation in Flash AS2Unknownnoreply@blogger.comBlogger7125tag:blogger.com,1999:blog-4698512362740560993.post-8620131076016328852012-07-29T22:50:40.297+01:002012-07-29T22:50:40.297+01:00Hi Anonymous,
The code I have written will work w...Hi Anonymous,<br /><br />The code I have written will work with only one object, but if you repeat the code as a block, specifying a different _root.object_mc with each code repetition you could use it to provide rotation for any number of objects. Think of the code as the engine for rotating one object. If you add a second object, repeat the code, but change the _root.object_mc name to match the instance name of the second object, and so on for all objects.<br /><br />The alternative is to use some object oriented approach, but that would mean a rewrite. So this is the easiest way to simply reuse the existing code for what you need. Good luck :-)Insighthttps://www.blogger.com/profile/15463691980222170403noreply@blogger.comtag:blogger.com,1999:blog-4698512362740560993.post-46135823429614977342012-07-29T21:35:55.993+01:002012-07-29T21:35:55.993+01:00Hi, I'm making a poseable mannequins. Will it ...Hi, I'm making a poseable mannequins. Will it work on different parts of the body or just one object?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4698512362740560993.post-90887648938341963092012-06-18T22:17:19.038+01:002012-06-18T22:17:19.038+01:00Hi Vishal, interesting question. I don't have ...Hi Vishal, interesting question. I don't have time to answer this in full at the moment, but the logic is this.<br /><br />While dragging you need to test the rotation angle at intervals and compare current angle with previous angle last time you tested. This will give you a value to use as a "velocity" of rotation. <br /><br />Once you have this when the dragging is stopped you simply continue the rotation going at the same value as your last test, each interval. You add friction by dividing the rotation value by a friction factor on each interval until it becomes zero. Use an IF to test when it is nearly zero, make it actually zero and cancel the interval.<br /><br />Something like that. Maybe I will have time to make this code soon, but give it a try if possible.Insighthttps://www.blogger.com/profile/15463691980222170403noreply@blogger.comtag:blogger.com,1999:blog-4698512362740560993.post-91600654351290449962012-06-18T05:35:12.469+01:002012-06-18T05:35:12.469+01:00How can i add momentum to the rotation?How can i add momentum to the rotation?Vishalhttps://www.blogger.com/profile/14128575164804050661noreply@blogger.comtag:blogger.com,1999:blog-4698512362740560993.post-83130901379994862782012-06-17T18:09:38.652+01:002012-06-17T18:09:38.652+01:00How can Add momentum to the rotation? Like the &qu...How can Add momentum to the rotation? Like the "Drag and drop (with momentum) tutorial? Please help.Vishalhttps://www.blogger.com/profile/14128575164804050661noreply@blogger.comtag:blogger.com,1999:blog-4698512362740560993.post-77138106374038312262011-11-30T12:27:55.835+00:002011-11-30T12:27:55.835+00:00thaks, nice post.thaks, nice post.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4698512362740560993.post-89424819197349579412010-12-10T15:58:14.735+00:002010-12-10T15:58:14.735+00:00Great post, I have been looking for that...
-Rega...Great post, I have been looking for that...<br /><br />-Regards<br />BennettAnonymousnoreply@blogger.com