First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Alex Nino | Website: http://www.yoambulante.com/

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

» Level Intermediate

Added: 2010-02-26
Rating: 9.5 Votes: 2
(10 being the highest)
» Author
My bio... hmmm... what to say... I arrived on this crazy world clearly by mistake on March 81, in a far, far forgotten small town but with more problems than a whole nation, close to the pacific ocean in the Colombian territory, it is called Cali. Early I began playing with some gadgets like "telebolito", "intellivision", "Atari", and it was here when I started feeling interested in games and how they are being done but before start programming I've learned to play piano a guitar (I love music, can't live without it). Then I learned some programming languages such pascal with Borland Delphi, and C++ but I have to confess that it was Macromedia Flash who changed my life once we met each other in 98. I'm working with it since it didn't have support of mp3 audio format files, yes the version 3. And then together (Flash and I) started travelling around america looking for a better job opportunity and professional development than my hometown couldn’t offer us at that moment. Special thanks to: Brazil, Costa Rica and Colombia for being a great school. At this moment I'm happily living and paying taxes in London, UK but like a salmon fish one day I will be back.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.