-
I am doing a multimedia CD for an upcoming confrence and the main informational part is set up like a web site and I trying to set up the AS so that when you click on the buttons for the different sections it will make the background image MC change colors, ie. blue tint picture to green tint.
So far I can get the color to change by adding to each button a variation (depending on the color) of this:
//myBackground is the target
on (release) {
myColor = new Color (myBackground);
myColorTransform = new Object;
myColorTransform = { ra: '100', rb: '50', ga: '100', gb: '40', ba: '0', bb: '-255', aa: '100', ab: '0'}
myColor.setTransform(myColorTransform);
}
But what I want to do is make the color change over several steps. I am compleatly clueless on how to make it transition over steps to the new color.
Please help.
-
Why don't u use a moviclip to change its colors?!
Working with an array and a movieclip u can change "myBackground" colors
create a new movieclip (controlColors) with 4 frames.
1st frame
colors = new Array('FF00CC1,'FFFF00','FF0000','0000CC')
size = colors.length
stop();
4th frame
if (x < size) {
newColor = new Color("_root.myBackground");
newColor.setRGB(parseInt("0x"+colors[x]));
delete newColor;
x++;
gotoAndPlay(2)
} else {
x=0
stop();
delete colors;
}
In the main timeline u call it.
on (release) {
_root.controlColors.gotoAndPlay(1)
}
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
|