In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: Clouds

Get Adobe Flash player
by bradsedito 28 Nov 2010
// forked from h_sakurai's Clouds
package {
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Sprite;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.geom.ColorTransform;
    import gs.*;
    import gs.easing.*;
    import flash.display.StageQuality;

[SWF(backgroundColor=0xffffff, frameRate=60)]

    public class Clouds extends Sprite {
        public function Clouds() {
            
            stage.quality = StageQuality.BEST;

            var bmd:BitmapData = new BitmapData(64, 64, false);
            var bm:Bitmap = new Bitmap(bmd);
            bm.rotationX = 62; 
            bm.scaleX = 55;
            bm.scaleY = 45;
//          bm.z = 300;
            bm.x = -1500;
            addChild(bm);

            var offset:Array = [new Point(), new Point()];
            var col:ColorTransform = new ColorTransform(0.5,0.5,0.5,1,0,0,0);

            addEventListener("enterFrame", function():void {
            //    TweenMax.to(offset[0], 1, {y++:2, ease:Quad.easeOut});
                offset[0].x+=0.04;
                offset[0].y+=0.02;
                offset[1].y+=.03;
                offset[1].x-=.03;

                bmd.perlinNoise(20, 10, 6,
                0, false, true,
                    0, true, offset);
                bmd.colorTransform(bmd.rect, col);
            });
            
            
//          var bmd2:BitmapData = new BitmapData(64, 64, false);
            var bm2:Bitmap = new Bitmap(bmd);
            bm2.rotationX = 62; 
            bm2.scaleX = 55;
            bm2.scaleY = 45;
//          bm2.z = 300;
            bm2.x = -1500;
            bm2.alpha = .6;
            addChild(bm2);
            
       //   var offset:Array = [new Point(), new Point()];
       //   var col:ColorTransform = new ColorTransform(0.5,0.5,0.5,1,0,0,0);

            addEventListener("enterFrame", function():void {
                
                if ( mouseY << 100 )
                    {
                        TweenMax.to(this, 1.25, {x:mouseX, y:mouseY, tint:0xff9900, colorTransform:{exposure:2.}, blurFilter:[0xff9900,16,16,3], ease:Quad.easeOut});          
                    }
                
                
                
                offset[0].x+=0.04;
                offset[0].y+=0.06;
                offset[1].y+=.03;
                offset[1].x-=.03;

                bmd.perlinNoise(10, 10, 8,
                0, false, true,
                    0, true, offset);
                bmd.colorTransform(bmd.rect, col);
            });
 
            
            
            
            
       }
    }
}