Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Motion Tween depending on IF statement..

Status
Not open for further replies.

basepointdesignz

Programmer
Jul 23, 2002
566
GB
Hi,

Is it possible to alter the properties of a symbol in a tween depemding on a IF statement?

Basically, I have a CD-ROM that the main page fades/tints to a different colour depending on the page, which of course depends on the button pressed..

Is there a way to alter the tint colour the symbol tween from/to depending on the button pressed? If so, can I have some sample code and where to put it - I'm a newbie to this stuff..

Cheers,

Paul @ Bullet-Proof Designz..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
You can do this better in code than with a tween using a color() object like this:

1 Make your background graphic into a movieclip (with instance name 'bg' in this case) and place it in a layer of its own so that it appears in all the parts of the movie where you want it. It doesn't matter what colour you give it at this stage

2 Add this code to the buttons you want to use to set the background colour:

Code:
on(release){
background=new Color(bg);
background.setRGB(0xcc0000);//turns it red
}

The easiest way to set the colour is to think RGB values - a six digit code which you'll see at the top of the colour palettes.

There's a .fla here for you to disect...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top