# Changing to AS 2.0

**URL:** <https://forum.kirupa.com/t/changing-to-as-2-0/220519>\
**Category:** flash\
**Created:** [March 27, 2007, 2:55am UTC](https://forum.kirupa.com/t/changing-to-as-2-0/220519 "2007-03-27T02:55:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jor133d](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jor133d/32/315_2.png) [@jor133d](https://forum.kirupa.com/u/jor133d)\
**Post date:** [March 27, 2007, 2:55am UTC](https://forum.kirupa.com/t/changing-to-as-2-0/220519/1 "2007-03-27T02:55:53Z")

</div>

I found a tutorial I would like to change to AS 2.0 make the code mainly on the first frame of the main timeline.

I have a movieclip called “circle\_mc” that changes color with a series of 6 sliders. 2 (ra and rb) for red, 2 (ga and gb) for green and 2 (ba and bb) for blue.

On slider A:

onClipEvent (enterFrame) {  
raColor = new Color(\_root.circle\_mc);  
raTransform = new Object();  
raTransform.ra = ((this.sliderknob1.\_y)\*-1);  
raColor.setTransform(raTransform);  
}

On slider B:

onClipEvent (enterFrame) {  
rbColor = new Color(\_root.circle\_mc);  
rbTransform = new Object();  
rbTransform.rb = ((this.sliderknob2.\_y)\*-2);  
rbColor.setTransform(rbTransform);  
}

Can someone help me out and let me know how I can accomplish the same but with code all on the the first frame of the main timeline.

Thanks!
