-
Does anyone know if it is possible to control the brightness, or the tint of a MC, with AS. ??
-
Apparently not. But you might achieve something by covering the object(s) you want tinted with another symbol of identical shape which has a fixed colour: and you can then change the alpha values of this overlaid symbol to create a virtual tint. Make sense?
[Edited by Andrew Staffell on 05-07-2001 at 10:30 PM]
-
Hi...sure by using the Color(object)...the setTransform method to be specific....for example, putting this action on a button will tint your mc to orange-ish...just substitute the Instance Name of your movie clip for 'myMovieClip' to see how it works...
Code:
on (release) {
myColor = new Color(_root.myMovieClip);
myColorTransform = new Object();
myColorTransform = {ra:'100', rb:'217', ga:'100', gb:'0', ba:'100', bb:'-153', aa:'100', ab:'0'};
myColor.setTransform(myColorTransform);
}
To get a complete description of how it works check out Color.setTransform in the ActionScript Reference Guide...
Hope this helps...
-pigghost-
[Edited by pigghost on 05-08-2001 at 12:09 AM]
-
thanx guys, I will give it a try.
-
-pigghost
I used your idea about the color transform, but now I need the color set back to the original color.
its, a game where when the hero gets hit, he "flashes", and when not hit he should look, normal. And thats where my problem lies.
-
Hi...in the above code you just need to change this line to:
myColorTransform = {ra:'100', rb:'0', ga:'100', gb:'0', ba:'100', bb:'0', aa:'100', ab:'0'};
This sets all the percentages and offsets back to the default settings...these settings are derived from the Advanced Settings in the Effect Panel...
To see all the things you can do, select a movieClip on the stage and go to Window>Panels>Effect...then in the dropdown pick Advanced...
Play around with the settings and you'll see the effects in color and alpha...
From this, you can decide what you'd like your settings to be in the code....
Hope this makes sense...
-pigghost-
-
it makes alot of sense, thanx again.
-
pigghost,
Thanx for your advice, I used it in this:
http://home1.stofanet.dk/henrike/spaceboy.htm
-
Very Cool! But I stink at the game...I got killed every time!
I'll have to come back and play it again when I have more time...
Take care...
-pigghost-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|