ActionS rgb fade ?
- Started
- Last post
- 14 Responses
- blackspade
heylo.
if i'm alpha fading a MovieClip using actionscript, ..how do I tweak it to blow out the rgb values?, rather than just a strait alpha fade...
--------------------------var mc = backphoto;
onEnterFrame = function ()
{
var speed = 10;
if (mc._alpha < 100)
{
mc._alpha += speed;
}
else
{
delete onEnterFrame;
}
};
- MX_OnD0
what exactly are you trying to do?
heading out for beers but back in 20 or so...
formulate it well now.
- blackspade0
im trying to give it the effect you see when you take a photo_mc and tween out the RGB values in the advanced colour properties...
but i need to do it via actionscript, not a tween... make sense ?
ie this effect on the photos
http://www.dmp.co.nz
- UndoUndo0
check out the color object
- blackspade0
?
..i know how to achieve the effect using the colour properties and tweening...what im asking is; is there a way to do it via Action Script, instead of tweening
- blackspade0
thanks monNom, i shuld be able to get it from that link
- UndoUndo0
yes blackspade the colorObject.
open up help, type 'color object' click search, then read what it tells you to do
:)
- blackspade0
hmm thanks ok so i need to use a colour object..
but still have no idea how to apply that in actionscript to make my _mc fade in RGB value :(
- UndoUndo0
if you apply the color object to an mc with an image inside and then animate the channels, the color in the image represented by the color will animate too.
- moook0
try this one out, give it a copy and paste:
var c:Color = new Color(nameOfYourMovieCLip);
var offSet:Number = 255;var tween = new mx.transitions.Tween(this, "offSet", mx.transitions.easing.Strong.eas... 255, 0, 200, false);
tween.onMotionChanged = function () {
c.setTransform({ra:100, rb:offSet, ga:100, gb:offSet, ba:100, bb:offSet, aa:100, aB:0});
}if you use this way instead of the enterFrame then you can get a nice ease in or out to the transition.
- blackspade0
thanks guys i shuld have looked at kirupa first
http://www.kirupa.com/forum/show…
thanks tho, appreciate it!!!!
- MX_OnD0
shite man, sorry totally bolted there.
good to see you're fixed though.
- moook0
Man, that Superfades class looks over complicated. Good way to crack a nut using a sledgehammer i reckon.