Toggle navigation
Sign Up
Log In
Explore
Works
Folders
Tools
Collections
Artists
Groups
Groups
Topics
Tasks
Tasks
Jobs
Teams
Jobs
Recommendation
More Effects...
ActionScript
package { import flash.display.BitmapData; import flash.display.Bitmap; import flash.events.Event; import flash.geom.Point; import flash.display.Sprite; import flash.geom.ColorTransform; import flash.geom.Matrix; import flash.filters.GlowFilter; import flash.events.MouseEvent; [SWF(width="660", height="660", backgroundColor="0", frameRate="30")] public class Main extends Sprite{ private const W:Number = 660; private const H:Number = 660; private const RANGE:int = 5; private var _p:Point; private var _sp:Sprite; private var _ctf:ColorTransform; private var _canvas:BitmapData; private var _glow:BitmapData; public function Main() { init(); addEventListener(Event.ENTER_FRAME, update) ; stage.addEventListener(MouseEvent.CLICK, onDown); } private function init():void{ _p = new Point( W/2, H/2 ); _sp = new Sprite(); _sp.filters = [new GlowFilter(0xC9E6FC, 1, 10, 10, 4, 3, false, false)]; _ctf = new ColorTransform(0.9, 0.96, 1, 0.9); _canvas = new BitmapData(W,H,false,0); var bm:Bitmap = new Bitmap(_canvas, "auto", true); _glow = new BitmapData(W / RANGE, H / RANGE, false, 0); var glowBm:Bitmap = new Bitmap(_glow, "never", true); glowBm.blendMode = "add"; glowBm.scaleX = glowBm.scaleY = RANGE; addChild(bm); addChild(glowBm); } private function onDown(e:MouseEvent):void{ _p = new Point(mouseX, mouseY); } private function update(e:Event):void{ _sp.graphics.clear(); var light_count:int = Math.random() * 10; for( var i:int = 0; i
Join Effecthub.com
Working with Global Gaming Artists and Developers!
Login
Sign Up
Or Login with Your Email Address:
Email
Password
Remember
Or Sign Up with Your Email Address:
Your Email
This field must contain a valid email
Set Password
Password should be at least 1 character
Stay informed via email