Free ActionScript

Flash AS2 & AS3 Tutorials, Game Code, Effects, Source Files & Sample Downloads

Realistic Floating Soap Bubbles


Here is a script that I needed for work: a realistic floating soap bubbles effect in flash.

Inside you can set the boundaries (min x, min y, max x and max y), the number of bubbles, and the start point/end point of where the bubbles come out from.

Download Fla Sample

Download Fla Sample

12 Responses

Hi! awesome script, thanks for share.
Dude i have a problem, i use our script and change some things, but i can’t put the bubbles in the back, i want to puts some text flying around the flash screen but i can’t put the bubbles behind the text, can you help me?

Again thanks for share, nice work

  • Hi 4ourgs,

    Create separate containers for everything, layered in their appropriate highs: background < bubble container < text container
    Add bubbles to the bubble container, and add text to the text container.


  • Hi,

    Thanks for this beauty! It works great but as soon as I place stop(); action (nothing else) on the timeline I get the following compiler errors: “…, Line 1 – 1180: Call to a possibly undefined method addFrameScript.” and “…Layer ‘actions’, Frame 13, Line 1 – 1180: Call to a possibly undefined method stop.”
    Any idea what is going on? There is no “addFrameScript” anywhere as far as i can see…

  • Hi there,

    The document class ( extends Sprite. Sprites can’t have code attached to the timeline. Extend MovieClip instead of Sprite.


  • I wonder if there was a way to stop bubbles from appearing in certain frames, a command that would disable from kicking in depending on the frame…

  • this is incredibly. its exactly what i want as part of a banner project for my flash class. but how in the hell do i use it?!

  • OMG this is really nice work!

  • I want to change the size of the bubbles.
    In I changed the _container.scaleX = _container.scaleY but didn’t work.How can I do it properly?

  • Leave a Reply

    You must be logged in to post a comment.