actionscript: change hue

I would like to know if there is a function to change the hue of a movie clip on the fly.
Who is Participating?

 There is no way by which you can change the hue of the MovieClip on the fly. Unless you write a custom (and ofcourse complex function) which can manipulate the colors and do for you. As far as my knowldge there is no function which does this.

The closest which I was able to find for you was this code at :

//this function acts on normalized values for hue,luminosity,saturation
//numbers between 0-1
      var r,g,b
            var t1,t2,rt3,gt3,bt3
              if(l<0.5) t2=l*(1.0+s)

                  t1 = (2*l)-t2
            }else if(2*rt3<1){
              }else if(3*rt3<2){
            }else if(2*gt3<1){
            }else if(3*gt3<2){
            }else if(2*bt3<1){
            }else if(3*bt3<2){
      return {r:r,g:g,b:b}

/*test it out
hue=90 // 0-360 degrees
luminosity=50 //0-100 percent
saturation=50 //0-100 percent

r=rgb.r*255 //convert back to range
g=rgb.g*255 //convert back to range
b=rgb.b*255 //convert back to range
hex=r<<16|g<<8|b //convert to hex for use with color object*/
Let me know if this helped !

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.