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!

change color of mc 1

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
iv got a movieclip (_root.ball) that i want to change color with actionscript. i have got it working using setTransform and ra:'0' rb:'366' ga:.... etc

but this seems to be removing the alpha from some of the tweens in the MC and removing my radial fill effects.

is there a way to change the color of my movieclip but leave the tweens (in the mc) that need to be transparent the same and also leave my radial fills intact?

thanks,

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
maybe the easiest thing to do is place a rectangle inside the clip the size of the clip and change the color of that.
just target the rect and apply the color changes there.

_root.ball.myrect
 
not as easy as that :(

i'll explain a bit better (slightly simplified version of what i have)

_root.starburst is the main MC, this is the one i want to change color.

in startburst i have the mc 'dot', _root.starburst.mc
in this mc is an animation tween of a ball moving from _x = 0 to _x = 100 and along the same timeline the alpha going from 100 to 0. the ball is a radial fill red, alpha=100 in the middle going to yellow, alpha=0 on the outside.

the mc 'dot' is constantly being duplicated by a script on the timeline in _root.starburst its also being given a random rotation setting befor every duplication.

this all gives the effect of dots flying from the center of the screen to the outside of the screen. and as they near the outside they fade away.

now what i am trying to do is have 3 buttons. each button has a mouseover script. b1 turns the starburst blue, b2 turns it red and b3 turns it green.

now i know i could do this using a simple mc.gotoandstop action and putting 3 different instances of dot in starburst, each with its own color. but id realy like to do this with code instead.

thanks,

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
cool, thanks, that does indeed aproach what i need :)

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top