=================================================================================================
MovieClip.prototype.soundStart= function(url) {
trace("#soundStart("+url+")")
if (this.mysoud == undefined) {
this.mysound = new Sound();
}
this.during = 0;
this.mysound.onLoad = function(success:Boolean) {
if (success) {
this.mysound.start(15);
//status_txt.text = "Sound loaded";
} else {
//status_txt.text = "Sound failed";
}
};
this.mysound.loadSound(url, true);
};
MovieClip.prototype.soundPuese = function(vs) {
if (vs) {
this.mysound.start(this.during);
} else {
this.during = mysound.position/1000;
this.mysound.stop();
}
};
=================================================================================================
갑자기 사운드 관련해서 작업을 해야해서 급조해서 만들어낸 프로토 타입^^;;;
원래 클래스의 사용을 지향하지만 빠른 작업을 요하는 관계로...프로토 타입을 만들었습니다.
최소한도의 기능을 가진 프로토 타입이 2개가 존재를 하는데 일단 프로토 타입은 무비클립을 경유해서 작동되기 때문에 같은 녀석을 경유해서 해야 합니다 안그러면 사운드 두개가 같이 플레이 되는 현상을 접하시게 됩니다...ㅎㅎ
mc_a.soundStart(사운드url);
mc_a.soundPuese(true,false둘중하나가 들어갑니다.);
그렇게 잘만들어진 프로토 타입은 아니지만 그나마 아직은 버그가 안보이는데 위안이 가는군요..^^;;


::: 사람과 사람의 교감! 人터넷의 첫 시작! 댓글을 달아주세요! :::