[Brevity] ok my first try !

Keith Peters kp at bit-101.com
Tue Jun 27 15:30:00 EDT 2006


Wow.
I can't tell you how cool it is to see that! The first piece I've seen done
by someone else, using Brevity. Kind of like seeing your baby grow up and go
off into the world. :) And something that I wouldn't have thought of doing.
Looking forward to see more!
Keith

  _____  

From: Brevity-bounces at osflash.org [mailto:Brevity-bounces at osflash.org] On
Behalf Of David Simon
Sent: Tuesday, June 27, 2006 3:19 PM
To: Brevity at osflash.org
Subject: [Brevity] ok my first try !


Not really optimised. Just playing with Numbers :-)
 
 
 
// global vars:
var clips:Array;
var theta : Number = 0 ;
 
function setup()
{
    stageWidth = 400;
    stageHeight = 400;
    backgroundColor = 0x000000;
    frameRate = 21;
}

function init()
{
    // create the array
    clips = new Array();
    for(var i:int = 0; i < 80; i++)
    {
        // make the clips, position them, push them on the array
        var clip:Circle = new Circle(40+random(80), randomColor()); 
        clip.alpha= 0.1  ;
         clip.edgeBehavior = "wrap" ;
        clip.randomPosition();
        clips.push(clip);
    }
    // start the loop
    run();
}
function loop()
{ 
    for(var i:int = 0; i <80; i++)
    {
        var clip:Circle = clips[i];
        clip.vx=10*sin(13*theta-i)*cos(11*theta-i);
        clip.vy=-clip.width /30 ;
        clip.width=clip.height = 90+90*cos(3*theta-i)*sin(7*theta-i) ; 
        clip.move();
    }
    theta+=0.01;
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/brevity_osflash.org/attachments/20060627/55cf51fc/attachment.htm


More information about the Brevity mailing list