Jump to content

Making Pulsating Glow Around Object With Music


username132
 Share

Recommended Posts

I want to make an image glow with a pulsating yellow glow whilst a melodramatic tune plays in the background. I took this code out of the Flash helpfile and changed all instances of mc_box to "pot" which is the name I gave my object in 'properties'.I put this into action, and it spews out some unintelligible errors.

pot.filters = [new flash.filters.GlowFilter()];var dir:Number = 1;pot.blur = 10;pot.onEnterFrame = function() {    pot.blur += dir;    if ((pot.blur >= 30) || (pot.blur <= 10)) {        dir *= -1;    }    var filter_array:Array = pot.filters;    filter_array[0].blurX = pot.blur;    filter_array[0].blurY = pot.blur;    pot.filters = filter_array;};

Errors;**Error** Symbol=Symbol 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handler pot.filters = [new flash.filters.GlowFilter()];**Error** Symbol=Symbol 1, layer=Layer 1, frame=1:Line 2: Statement must appear within on handler var dir:Number = 1;**Error** Symbol=Symbol 1, layer=Layer 1, frame=1:Line 3: Statement must appear within on handler pot.blur = 10;**Error** Symbol=Symbol 1, layer=Layer 1, frame=1:Line 4: Statement must appear within on handler pot.onEnterFrame = function() {Total ActionScript Errors: 4 Reported Errors: 4What did I do wrong?

Link to comment
Share on other sites

  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...