PDA

View Full Version : Pre roll video


nysmenu
11-10-2009, 05:31 PM
Guys, I built a multi video player in flash and I was wondering if any one knows how to add code to the player to play a pre roll video ad.

stop ();
function videoOne (event:MouseEvent):void{
Player.source = "flvs/01.flv";
}
function videoTwo (event:MouseEvent):void{
Player.source = "flvs/02.flv";
}
function videoThree (event:MouseEvent):void{
Player.source = "flvs/03.flv";
}

OneV.addEventListener(MouseEvent.CLICK,videoOne);
TwoV.addEventListener(MouseEvent.CLICK,videoTwo);
ThreeV.addEventListener(MouseEvent.CLICK,videoThree);

[Paul Ferrie ]
11-19-2009, 11:10 AM
Instead of passing the video to the source in the button click put in a variable holder instead.


var vid:String=""
function videoOne (event:MouseEvent):void{
vid = "flvs/01.flv";
Player.source="Advert.flv"
}
function videoTwo (event:MouseEvent):void{
vid = "flvs/02.flv";
Player.source="Advert.flv"
}
function videoThree (event:MouseEvent):void{
vid = "flvs/03.flv";
Player.source="Advert.flv"
}

OneV.addEventListener(MouseEvent.CLICK,videoOne);
TwoV.addEventListener(MouseEvent.CLICK,videoTwo);
ThreeV.addEventListener(MouseEvent.CLICK,videoThree);

You would then create a listener and function to listen for the advert video finishing before passing the flv you want to play.

hope it helps

nugjioei
11-21-2009, 07:47 AM
I would recommend these guys even though they oversell their servers.
Meilleur taux calcul simulation pret personnel | (http://pretpersonnelenligne.org/)
Demande pret personnel credit | (http://pretpersonnelenligne.org/demande-pret-personnel/)
Simulation credit personnel a taux reduit (http://pretpersonnelenligne.org/credit-personnel-a-taux-reduit/)