-
Illuminatus!
Looking on how to tint an mc thru AC -- help please!
i want to stimulate the white blink effect when the hero is hit - but i dont want to create another frame in the hero mc - itll be an argument to the other variables.
so my question is: how would i tint an mc white thru ac?
set color transform...something like that, please give me a hint guys!
-
DOT-INVADER
it's something like:
Code:
new_coloration = new color(_root.player);
color_change = {ra:'-100', rb:'255', ga:'-100', gb:'255', ba:'-100', bb:'255', aa:'100', ab:'100'};
new_coloration.setTransform(color_change);
if you are lost, i can explain more ^^
i'm not sure, but i applied it in my fighting game open source, used to change some settings of the shadow.
-
wow, thanks for that bit of code! I just added a Disco cheat to my game because of this... Yee!
-
DOT-INVADER
really? ^^
you can also play with random values, and play it on an enterFrame event. that's surely super disco tonight!
-
yup! Thats what i did! Heh.
-
Illuminatus!
_root.bigCir = new Color(_root.cirBig);
bigCir.setRGB(0xff6666);
www.fospher.com/color.swf [press the small black circle]
www.fospher.com/color.fla
hmmm is that the f4 method? i found another one marmotte, and made a little fla out of it...
well that worked for a little independent swf - but didnt work for my game oh well thanks for the help 'motte.
-
Illuminatus!
hmmm apparently my method only works thru a button - well onto your code marmotte
could you explain that code btw?? i dont see where the rgb would go at all...just a bunch of numbers to me
-
Illuminatus!
holy cow!!!!!!!!!!! that code turned my guy negative, not white!! amazing!!!!! gee thanks a million marmotte, i didnt know that was even possible!
oh and how would i reset?
Last edited by fospher.com; 02-23-2003 at 01:59 AM.
-
DOT-INVADER
hey fospher:
negative, mmmh? ^^
i used that effect in my kid icarus conversion, when you was hit by an enemy; your colors was flashing during a short period of time...
to reset the values, just put them at 0 again:
color_change = {ra:'0', rb:'0', ga:'0', gb:'0', ba:'0', bb:'0', aa:'0', ab:'0'};
> what these values mean:
well, when you try to change them manually via flash:
click your MC once, then choose "color" in the floating window below (where you can choose for example the alpha property of the MC). choose "advanced", and then you have another window with 8 values. these are the ones...
-
Originally posted by fospher.com
holy cow!!!!!!!!!!! that code turned my guy negative, not white!! amazing!!!!! gee thanks a million marmotte, i didnt know that was even possible!
oh and how would i reset?
what numbers did you use?!?!?! id really like to know!!!
-
nevermind i guess the numbers were the ones marmotte used!
-
Hype over content...
If it's any help www.robertpenner.com has a load of colour prototypes on there ( Tint, brightness etc. ), I use them in just about everything !
Squize.
-
Illuminatus!
@'motte: the graphic i was using was a GIF though, i thought flash could only handle vector --- i guess they lied to us . mine really didnt flash, just reversed the colors - e.g. black turned to white, orange turned to blue, blue turned to pink...awwesome...and thanks for explaining the code.
oh and the reset code u gave me seems to turn the guy transparent -- i guess ill play around with it some more
@squize: of course, i forgot all about that site - i had it bookmarked but then i reformatted my comp - thanks for the link.
Last edited by fospher.com; 02-24-2003 at 12:37 AM.
-
Illuminatus!
it appears the reset code is: {ra:'100', rb:'0', ga:'100', gb:'0', ba:'100', bb:'0', aa:'100', ab:'0'}
if you reset everything to 0, it sets the alpha to 0, too, not to mention the RGB. for those of you who are just peeping at this thread, i found the info, so ill post the explanation of the code.
ra is the percentage for the red component (-100 to 100).
rb is the offset for the red component (-255 to 255).
ga is the percentage for the green component (-100 to 100).
gb is the offset for the green component (-255 to 255).
ba is the percentage for the blue component (-100 to 100).
bb is the offset for the blue component (-255 to 255).
aa is the percentage for alpha (-100 to 100).
ab is the offset for alpha (-255 to 255).
thanks for all the help g's, you're the ****
-
DOT-INVADER
oh and the reset code u gave me seems to turn the guy transparent
baaaahyes ^^
i just wrote the code too fast. of course if the alpha values are at 0, no more character visible.
-
I'm dope.
bravo, very helpful thread. those codes are just fun to use.
w00t!
-
booooosted!
[can we not private message someone on this board?]
anyways.. psytrix, just noticed where you live. i lived in shreveport for about 6 years. i was stationed there. i just got back here to cali about 7 months ago (even tho i got out of the military in 2000, i stayed there with my ex-wife (not ex at the time), she's from keithville.
just thot i'd say hey.
-frank
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
|