neon light
Phlashers 2010 AS3 Contest
http://www.phlashers.com
-John Chris Calida
/**
* Copyright jccalida ( http://wonderfl.net/user/jccalida )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/q9ow
*/
// 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(0xd40202, 1, 10, 10, 10, 3, true, false);
var voltage:GlowFilter = new GlowFilter(0xfd0101, 1, 8, 5, 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;
}
}
}