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: neon light

Phlashers 2010 AS3 Contest
http://www.phlashers.com
-John Chris Calida
Get Adobe Flash player
by hacker_d9x06x60 07 Mar 2012
/**
 * Copyright hacker_d9x06x60 ( http://wonderfl.net/user/hacker_d9x06x60 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/hPUe
 */

// forked from jccalida's neon light
   // Phlashers 2010 AS3 Contest
   // http://www.phlashers.com
   //-John Chris Calida

package {
    import flash.display.Sprite;
    import flash.display.MovieClip;
    import flash.filters.GlowFilter;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.display.Stage;

    [SWF(width = "300", height = "100", backgroundColor = "#000000", pageTitle  = "Neon")]
    
    
    public class Neon extends Sprite
    {
        
        public function Neon()
        {
            //make the neon frame
            var neonFrame:MovieClip = new MovieClip();
            makeNeonSign(neonFrame);
        }
        
        
        private function makeNeonSign(Ne:MovieClip):void
        {
            //tube bending
            var neonText:TextField = new TextField();
            var style:TextFormat = new TextFormat();
            
            //apply high voltage to the gas for the glow
            //put some red on, adjust transparency, horizontal blur, vertical blur, light strenght, quality, inner glow, knockout effect
            var neonGas:GlowFilter = new GlowFilter(0xefefef, .6,10, 10,10, 3, true, true);
            var neonGas2:GlowFilter = new GlowFilter(0xff0f0f,.8,10, 10,10, 3, true, false);
            var voltage:GlowFilter = new GlowFilter(0xfd0101, 1, 18, 15, 3, 3, false, false);
            
            var output:Array = new Array(neonGas, voltage);
            
            //design the glass tubes
            neonText.text = "( neon )";
            neonText.selectable = false;
            
            
            style.font = "Courier";
            style.size = 60;
            neonText.setTextFormat(style);
            

            this.addChild(Ne);
            Ne.addChild(neonText);

            //wall placement
            neonText.width = 250;
            neonText.x = 45;
            neonText.y = 10;
            
            //turn it on
            neonText.filters = output;
        }
    }
}