私はこの2つの機能を持っています。ご覧のとおり、最初のものはビデオをストリーミングしており (魔女がループしている)、2 つ目はオーディオをストリーミングしています (魔女もループしています)。したがって、オーディオの長さがビデオの長さよりも大きいため、ビデオがオーディオを再生しているときに、実行を開始して独立してループする必要があります。どうすればそれを行うことができるのでしょうか。コードを使用してください。
function NCListener(e:NetStatusEvent){
if (e.info.code == "NetStream.Play.Stop") {
ns.play("http://media.easyads.bg/ads/display_ads_richmedia/video/avon/maria_ilieva/video_2.flv");
shaker(null);
}
};
var sound:Sound = new Sound();
var soundChannel:SoundChannel= new SoundChannel();
sound.addEventListener(Event.COMPLETE, onSoundLoadComplete );
function onSoundLoadComplete(e:Event):void{
sound.removeEventListener(Event.COMPLETE, onSoundLoadComplete);
soundChannel = sound.play(0, 9999);
soundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundChannelSoundComplete);
}
function onSoundChannelSoundComplete(e:Event):void{
e.currentTarget.removeEventListener(Event.SOUND_COMPLETE, onSoundChannelSoundComplete);
soundChannel = sound.play(0, 9999);
}