我有这个问题。有一个带有 AS3 代码的横幅,我们的系统只显示 Flash Player 9 的横幅。但是 Flash Player 9 不支持 AS3。那么有没有办法以简单的方式做到这一点?或者我必须在 AS2 上重写它?这是代码。
import flash.events.Event;
import flash.net.URLRequest;
import flash.events.MouseEvent;
import flash.media.SoundTransform;
import flash.media.SoundMixer;
cierre.gotoAndStop(1);
SoundMixer.soundTransform = new SoundTransform(0);
video_player.autoPlay = true;
video_player.source = "video_500x374.f4v";
video_player.addEventListener(Event.COMPLETE, finVideo);
stop();
b2_btn.buttonMode = true;
buttonclose.addEventListener(MouseEvent.CLICK,buttoncl);
function buttoncl(e:Event):void{
video_player.stop();
this.gotoAndStop(1);
}
var paramList:Object = this.root.loaderInfo.parameters;
b2_btn.addEventListener(MouseEvent.CLICK, openURL);
function openURL(evtObj:MouseEvent):void {
var request:URLRequest = new URLRequest(paramList["clickTag"]);
navigateToURL(request, "_blank");
}
function aBanner1(e:Event):void{
video_player.stop();
this.gotoAndStop(1);
}
function finVideo(e:Event):void{
video_player.stop();
cierre.play();
}
function setMute(vol) {
var sTransform:SoundTransform = new SoundTransform (0,1);
sTransform.volume = vol;
SoundMixer.soundTransform = sTransform;
}
var Mute:Boolean = false;
mutebutton.addEventListener (MouseEvent.CLICK,toggleMuteBtn);
function toggleMuteBtn (event:Event) {
if(Mute) {
Mute = false;
setMute(0);
}else{
Mute = true;
setMute(1);
}
}