Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > ActionScript
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old January 13th, 2008, 08:45 AM
Registered User
Join Date: Jan 2008
Location: Wellen, None, Belgium.
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... :)
Reply With Quote
  #2 (permalink)  
Old February 17th, 2008, 12:28 AM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2007
Location: San Diego, CA, USA.
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.
Reply With Quote

Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 09:26 AM

All times are GMT -4. The time now is 12:58 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.