0
votes

I have this problem. Have a banner which is code with AS3, and our system only displays banners up to Flash Player 9. But Flash Player 9 does not support AS3 . So is there a way to do it on the easy way? Or I have to rewrite it on AS2 ? Here is the code.

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);
}
}
1
Flash Player 9 does support AS3. But AS2 is often a requirement for banner ads, since some popup blockers block AS3's navigateToURL(request, "_blank").Lars Blåsjö
Ok. How to do it. When i chose the banner to be at Flash player 9 from flash it sais WARNING: This movie uses features that are not supported in the Flash 9 player Scene=Scene 1, layer=Layer 16, frame=2:The component 'fl.video.FLVPlayback' requires Flash Player 10 or later. VerifyError: Error #1053: Illegal override of play2 in fl.video.DynamicStream.Kircho Grozdanov

1 Answers

0
votes

You need to use the AS2 FLV Playback component. You should start with a clean new AS2 fla and start copying everything over except the components stuff.