Help me with pulse effect code

hey i need a piece of code to animate a blurred star. it needs to simulate the fast pulse of a star… i thought using a bit of code i developed to animate another thing i had but i guess theres something better.
i i have is this:

 
this.onEnterFrame = function() {
 resError.warn._alpha = ((1+Math.cos(counter2/3)*100)/5)+40;
};

help plz?