What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
Back when I was learning the basics in Stencyl I would just use the adjust brightness block to make the enemy brighter for a split-second. I have yet to find a similar solution for as3. Any help would be greatly appreciated.
I already knew how to detect if the enemy was being hit, so the shootorial didn’t help much. I ended up finding [this tutorial](http://active.tutsplus.com/tutorials/actionscript/create-a-brightness-editor-in-actionscript-3/) , which taught me how to change the RGB values of a movieclip. Making the values higher gave it a sense of being brighter.
> *Originally posted by **[Gharrot](/forums/4/topics/303322?page=1#posts-6431749):***
> I already knew how to detect if the enemy was being hit
I was specifically referring to some code that runs _because_ the player is hit, not _how to detect it._
Could you not just make a new object of your object \> break you object apart \> put it in a movieclip \> make the pixels in it white \> make a shape tween going from max alpha to 0 alpha over like 10 frames and then place it on top of you object that was hit. If you start the new movieclips alpha at 0 and begin it at frame 10 then whenever you are hit make the object go to frame 1. So the animation of the white will be fully visible and the fade animation will begin again.
Hope that made sense.
Depends if they are all the same. If it is just one object that you need this for, using a MovieClip would be fairly easy but if you need it for many more or need a dynamic way to do it, you best look for something else.
One way to have the effect would be to just add a filter or something to the MovieClip and remove it after a couple of frames.
thing.filters=[new GlowFilter()] edit the parameters of the filter though.
But I don’t know how performance or resource intensive that is though. There probably is a lighter solution.
If you’re using adobe flash, you could animate it yourself.
Or even if you’re not, you still could I just don’t know how to go about it.
But I believe that you can download and integrate something with flash develop if I remember correctly. Or maybe not and you just use an editor separately.
Either way its not a big deal.
But if you’re seeking to do it programmically…
google “as3 tint”
and I don’t believe theres any more efficient ways of doing this without using Timers.
So google “as3 timers” as well.
You may not need timers or intervals if it is only supposed to last for a small length of time. If you have lots of moving objects all of the same class and are updating them every frame, you could just add a section to the update code to say something like
You make an int instead which is decremented every frame and then checked if 0 if you want it to last more than 1 frame.
Also, [fl.motion.Color or ColorTransform ways to change colour](http://www.flashandmath.com/howtos/tint/index.html)
> *Originally posted by **[feartehstickman](/forums/4/topics/303322?page=1#posts-6436078):***
> say something like
Congradulations on posting the exact code I told him to go find in the Shootorials.
And yes, I spelled “congradulations” wrong on purpose.
I solved the problem on my own, thought I said that in the third post. I already knew how I was going to code it, I just needed to know how to change the brightness of a movieclip. I ended up just increasing the RGB values by 140.