This Balloon was an experiment I did playing a bit with Verlet physics (if I can catalogue the Verlet concept as part of physics). Using Verlet can be quite powerful but at the same time is a bit limited due to the simplicity of how physics are applied, we don't have much control of it and for adjusting stiffness between dots we need to do quite much, there are some people out there working a lot with it and making amazing things like this physics engine for action script 3.

In this experiment I made a rope (string) based on 30 dots linking them each other by using Splines curves. There is not mystery on this project, it can look complicated but it is not, it is based on the normal behaviour of Verlet particles. Verlet concept is very simple but looks like a huge monster engine running behind when what it does is basically moving dots on the screen based always on their previous positions, so the speed and direction of each dot is defined just by using the difference between its current position and the previous one and at the end all we need to do is just stick all dots together again trying to maintain same distance they got from the beginning to maintain its shape (polygon made of these dots).

At this moment I got a really basic system for animating this balloon, it is still a beta version but what I got so far can be downloaded here; I hope it could be usefull to someone, I have to finish it as soon as I have some spare time. Also I'm planning to break the whole source code in order to explain well detailed each part of it. I think it is really important understand how it works, you could apply these concepts almost in any kind of project (interactive game) you do if you want to have a beauty UI and offer a cool user experience.

With the source code I just added a tiny SWC called BalloonSkin.swc, it contents the balloon MovieClip (Sprite, it is not animated) that is being used in the program but the rest is being drawn on the fly. All you need is the Open Source Flex SDK, this source code is compatible with flash player 9, and don't forget to add the SWC when you compile it by using the parameters –library-path+=BalloonSkin.swc

Windows XP command line

Pull the balloon by the string with your mouse, but be careful I'm not validating screen dimensions, so if you lost it you may refresh your browser to see it again, lol!

download source code