Tutorial Navigation
 

     
 Links
 

 
.

 

 Search         Date   
      

SwishMax
:  Dynamic Box (Gummy Box Effect), 
October 14, 2004  -  by Ingrid  


The Script is very simple:

1) onload() event to create and initialize variables.
2) call the Wobble Box or Gummy Box function to create the box from the OnEnterFrame(). 

3) All inside 1 Sprite and just locate the sprite.

drawWobbleBox(X,Y,WIDTH,HEIGHT,Border_Color,Inside_Box_Color,Bolder_Alpha,Box_Alpha,Border_Width);


Sample:
drawWobbleBox(4,0,345,100,0xcc9900,0xFFFFCC,90,90,5);

onLoad () {
    elasticity = 0.2;    // Elasticity
    FactorCH = 1-elasticity;

    TARGETVX = 0;
    TARGETVY = 0;
}
onEnterFrame() {
    drawWobbleBox(4,0,150,100,0x6699FF,0xccffff,90,90,5);
    delete onEnterFrame;
}

Is very important to delete the onenterframe() to avoid the use of undesired cpu resource

The effect is great looking for any creation to add text inside.

Enjoy!

Note: The script is all around the web (lot of then) i just take the best of each of then and optimized to makeit easy to undertand and easy to use.
    Total Download: 140 Last Download: 8/02/2010

.

     
 Featured Links