# cs3 says i have to call the AS file

**URL:** https://forum.kirupa.com/t/cs3-says-i-have-to-call-the-as-file/239362
**Category:** programming
**Created:** [September 20, 2007, 9:40pm UTC](https://forum.kirupa.com/t/cs3-says-i-have-to-call-the-as-file/239362 "2007-09-20T21:40:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DrRobot](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/drrobot/32/3907_2.png) [@DrRobot](https://forum.kirupa.com/u/DrRobot)
#### Post date: [September 20, 2007, 9:40pm UTC](https://forum.kirupa.com/t/cs3-says-i-have-to-call-the-as-file/239362/1 "2007-09-20T21:40:04Z")

</div>

alright, cs3 is telling me i have to call the .as file to use it. but i ahve it set in the linkage of an MC.

the class:  
[AS]  
import flash.display.MovieClip;  
import flash.events.\*;  
class dayNight extends MovieClip {  
private var time:int = 0;  
private var count:int = 0;  
public function dayNight():void {  
stage.addEventListener(Event.ENTER\_FRAME, update);  
}  
private function updateRot() {  
if (count==5) {  
this.rotation += 1;  
count = 0;  
}  
}  
private function addValue() {  
count += 1;  
this.updateRot();  
}  
public function update(event:Event):void {  
++time;  
if (time == 120) {  
this.addValue();  
time = 0;  
}  
}  
}  
[/AS]
