Jump to content

Guest justin105

Changing Movieclip Brightness Using TweenLite Max

Recommended Posts

Hello I am trying to make a flash file with a slider that when you slide the slider the left it adjust the colour accordingly


Iam using the following code:


import com.greensock.*;

import com.greensock.easing.*;


import fl.events.SliderEvent;


slider.addEventListener(SliderEvent.CHANGE, skinTone);

function skinTone (event:SliderEvent):void {


TweenMax.to(hand, 1, {colorTransform:{brightness:0}});



I want this code to be dynamic so it changes when I slide the slider accross. Does anyone no the code for this?...


Thanks Justin

Link to comment
Share on other sites

You want the brightness to change? Or the hue? Saturation? I'm not totally clear on what you're after, but basically you'd make your slider go from the smallest value to the largest (set your constraints) and then use the SliderEvent.value to plug into the tween.


function skinTone (event:SliderEvent):void {
   TweenMax.to(hand, 1, {colorTransform:{brightness:event.value}});

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.