Changing the movie clip color using actioscript !

  • flaviosemeao
  • Newbie
  • Newbie
  • flaviosemeao
  • Posts: 10

Post 3+ Months Ago

Hi guys, it's me one more time !

Well, I already know how to do this using the design tools in Flash... but I would like to know if is possible change the movie clip color during the runing time (like an event mouse handler) using actionscript.
Using the authoring environment is easy (just put a movieclip in two keyframes, change the color in Tint in second keyframe and add tween motion).
But here is question, is it possible to reach que same effect using actionscript ?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

search some more before posting :/
it's already been answered here.
If you only want to make solid color, then use :
Code: [ Select ]
var my_color:Color = new Color(mcTarget);
my_color.setRGB(0xFF0000); // this will turn mcTarget completly to red
  1. var my_color:Color = new Color(mcTarget);
  2. my_color.setRGB(0xFF0000); // this will turn mcTarget completly to red
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

IceCold's example is a straight shift between colors.

If you're looking for a fade between colors. Check out this extension to the MovieClip class:
http://proto.layer51.com/d.aspx?f=1198

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.