Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > ActionScript
ActionScript Discuss the Adobe Actionscript language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ActionScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 13th, 2008, 09:45 AM
Registered User
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ragdoll physics in flash using actionscript 2.0


I'm a beginning programmer in flash, I wanted to make a sort of ragdoll wich you can drag etc. for my friends.
First I made a simple rope-drag engine on my Graphical calculator using BASIC, this worked on my computer.
In the next stage where I wanted to paste bodyparts on the ragdoll, I noticed the arms rotated around the neck. Not how it should be...
As a result of that I added shoulders wich would appear at a fixed distance of the neck, the angle is 90 degrees more or less then the angle of the neck to the upper joint of the body.
Making the arms follow the shoulder is no problem now, but when pushing the arm toward the shoulder the shoulder does really weird stuff... I think it is related to the arrangment of calculating the coördinates.
Now, since my english is too bad to explain it better, I've uploaded it.
The swf can be found here: http://d2.myfreefilehosting.com/d1/Ragdoll3.fla
The fla can be found here: http://www.zshare.net/flash/64341490170457
For the ones opening the fla, on the first frame I set the distances of the body-parts, on the second I set the ragdoll, on the third, temporarely frame, I've placed the rest of the bodyparts so have a clear view on the second frame where the movie stops...
Thank you in advance...

Visit ASDF.com sometime... :)
Old February 17th, 2008, 01:28 AM
Friend of Wrox
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts

That's pretty cool. I'm afraid your programming is better than mine, so I'm not sure how to fix the "jiggle" in the body. But it's pretty impressive... at least compared to anything that I'm building. ;)


Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bridging .NET with Actionscript tim.shih General .NET 0 July 14th, 2007 12:55 PM
Actionscript NaN brainchild Flash (all versions) 1 March 21st, 2007 07:29 AM
how to create a stub with actionscript and flash robprell Flash (all versions) 0 July 4th, 2006 01:44 PM
sound button w/actionscript nancy HTML Code Clinic 0 May 25th, 2005 01:20 PM
ActionScript Code Commenting Ben Horne Flash (all versions) 1 December 9th, 2003 10:26 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.