At 8/18/05 07:49 AM, Glaiel_Gamer wrote: tutorial
Ah! I think I've got something to add here! (Made in BBS/Flash 7) This worked last time I tried it but I haven't had access to that file while typing this so...
If you put this in a movie clip (it'll probably adapt to other stuff but I haven't tried it)
onClipEvent(load){
var thisColour:Color = new Color(this);
var colourDeafultTransform:Object = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0};
//sets up the values for the default/normal colours
var colourInverseTransform:Object= {ra:-100, rb:255, ga:-100, gb:255, ba:-100, bb:255};
//sets up the values for the inverse colours
thisColour.setTransform(colourDefaultTrans
form);
//sets the transform values for our movie clip to those for default colours
}
onClipEvent(enterFrame)
if(Key.isDown(90)){
thisColour.setTransform(colourInverseTrans
form)}
//if the 'Z' key is down the transform values are set to the inverse/photo negative values. if not...
else{
thisColour.setTransform(colourDefaultTrans
form)}
//the values are set to the default
}
You could also have other transformations set to other events like:
onClipEvent(load){
var thisColour:Color = new Color(this);
var colourDeafultTransform:Object = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0};
var colourFireTransform:Object = {ra:100, rb:0, ga:20, gb:0, ba:0, bb:0};
//a reddish, slightly orange tint
var colourWaterTransform:Object = {ra:0, rb:0, ga:70, gb:0, ba:100, bb:0};
//a turquoise tint
thisColour.setTransform(colourDefaultTrans
form);
}
onClipEvent(enterFrame)
if(this.hitTest(_root.lava)){
thisColour.setTransform(colourFireTransfor
m)}
else if(this.hitTest(_root.water)){
thisColour.setTransform(colourWaterTransfo
rm}
else{
thisColour.setTransform(colourDefaultTrans
form)}
}
!!UNTESTED!!
