OrganicBox AS2.0 class

Wednesday, May 11th, 2005

I need such organic box for my current project, so i wrote AS 2.0 class for such objects. Class is simple, and can be improved for more effect. It use Laco’s AS2.0 Tweening Prototype
, but if you want, just change it to your tweening system.

And creating organic box is simple:

[as]
var gr = _root.createEmptyMovieClip(”gr”,100)

var obj = new com.franto.gfx.boxOrganic()
obj.parentMovieClip = gr; //parent movieclip for organicBox
obj.objectWidth = 50;
obj.objectHeight = 50;
obj.outlineSize = 3;
obj.colorOutline = 0xff0000;
obj.colorBackground = 0xffffff;
obj.x = 100;
obj.y = 80;
obj.batchDraw = true;
obj.makeBox();
obj.draw();
[/as]

And here is function for resizing:

[as]
function changeSize() {
obj.batchDraw = false;
var easing = “easeInOutSine”;
var new_width = random(200)+50;
var new_height= random(200)+50;
obj.tween(”objectWidth”,new_width,0.5 ,easing );
obj.tween(”objectHeight”,new_height,0.5, easing );
}
[/as]

Hope, it will be helpfull for you.

AddThis Feed Button

This is some text prior to the author information. You can change this text from the admin section of WP-Gravatar  I'm living in Bratislava, Slovakia. I'm Senior Flex, AIR Developer for my own company Flexets. Read more from this author


tagged under:

ABOUT THIS AUTHOR

I'm living in Bratislava, Slovakia. I'm Senior Flex, AIR Developer for my own company Flexets.

Get a Trackback link

1 Trackbacks/Pingbacks

  1. Pingback: horneygamer com on July 14, 2008

2 Comments


  1. chris
    Visit Site
    September 2nd, 2005

    hey,

    this looks really sweet. is that AS2 class made available for download at all? if so where i can dl it?

    thanx,
    chris


  2. Administrator
    Visit Site
    September 5th, 2005

    yes, is it AS2 class (few of them), i can add them here, but i wanted to clear code before adding them.

Live Preview

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

This site is using OpenAvatar based on
Images is enhanced with WordPress Lightbox JS by Zeo
Clicky Web Analytics