하단과 같이 여러 개의 as 파일이 있고 하나의 fla 파일이 있는데 fla파일에서 맨 하단의 코드는 어디에서 적용시켜야 하는지요? 자바만 하다가 오늘 갑자기 flash cs 5를 배우게 되서 인터페이스조차도 생소하네요;;
답변 부탁드립니다.


Animal.as


class Animal extends MovieClip {


private var speed:Number;
private var name:String;


function Animal() { //trace("Animal.as-Animal "+this.name);
this.speed = 5;
this.name="Animal";


this.onRollOver = function() {
this.useHandCursor = false;//마우스가 버튼의 히트영역에 들어갔을때 손모양의 커서로 바꿀것인지
this.attachMovie("balloon", "balloon_mc", 0);//라이브러리에서 복제해서 인스턴스 네임과 심도를 부여한다
this.balloon_mc._x = this._xmouse;
this.balloon_mc._y = this._ymouse - 50;
this.balloon_mc.name_txt.text = this.name;
};


this.onRollOut = function() {
this.balloon_mc.removeMovieClip();//마우스가 영역을 벗어났을때 무비클립 지우기
};


this.onPress = function() {
this.startDrag(false);//마우스 따라가기
}


this.onRelease = function(){
this.stopDrag();//더이상 마우스 따라가지 않기
}


}

function run() { //trace("Animal.as-run "+this.name);
this.onEnterFrame = function() {
this._x += this.speed;
};
}


function stop() { //trace("Animal.as-stop");
delete this.onEnterFrame;
}
function setName (tempName:String){ //trace("Animal.as-setName");
this.name = tempName;//private이기 때문에 이 메소를들 이용해서 값을 집어넣기
}

}



Cat.as


class Cat extends Animal {


private var catSound:Sound;


function Cat() {//trace("Cat");
this.speed = 1;
}

function meow() {//trace("meow()");
catSound = new Sound(this);
catSound.attachSound("Meow");//라이브러리에서 가져온다
catSound.start();
}


}



Dog.as


class Dog extends Animal {

private var dogSound:Sound;

function Dog() {//trace("Dog()");
this.speed = 2;
}


function bark() {//trace("bark()");
dogSound = new Sound(this);
dogSound.attachSound("Bark");//라이브러리에서 가져온다
catSound.start();
dogSound.start();
}


}


animal.fla


dog_mc.setName("Fido");//setName메소드를 이용해서 무비클립의 name변수에 Fido값 넣기
cat_mc.setName("Fluffy");


dogRun_btn.onRelease = function() {
dog_mc.run();
};


dogStop_btn.onRelease = function() {
dog_mc.stop();
};


dogSound_btn.onRelease = function() {
dog_mc.bark();
};


catRun_btn.onRelease = function() {
cat_mc.run();
};


catStop_btn.onRelease = function() {
cat_mc.stop();
};


catSound_btn.onRelease = function() {
cat_mc.meow();
};