flv video cuts off when embedding into webpage
in actionscript 3.0 have created script loads flv video based on filename passed when swf embeded html of page. have created event listener on video detect when video finished, calls javascript function within embedded page can hide video & show different panel on page. when play video through flash program video plays full duration , seems work fine. when swf embedded web page video cuts off last 5 seconds of video (cutting of voice over). seems issue in latest version of flash. has else had issue , how fix it?
actionscript
import fl.video.*
import flash.events.*;
import flash.display.*;
var myvar:string;
var valuestr:string;
try {
var paramobj:object = loaderinfo(this.root.loaderinfo).parameters;
myvar = string(paramobj['myvar']);
}
catch (error:error) {
myvar="";
}
flvvplayer.source = "{address flv}";// + myvar;
flvvplayer.skin = "/skinoverplaystopseekmutevol.swf";
flvvplayer.addeventlistener(progressevent.progress, onloadprogress);
function onloadprogress(event:progressevent):void {
var loadedpct:uint = math.round(100 * (event.bytesloaded / event.bytestotal));
if (loadedpct >= 20){
flvvplayer.play();
}
if (loadedpct >= 91){
flvvplayer.addeventlistener(videoevent.complete, completeplay);
}
}
function completeplay(ve:videoevent):void {
if(ve.state=='stopped') {
flvvplayer.alpha=0.2;
var r:urlrequest = new urlrequest("javascript:hidevideo()");
navigatetourl(r,'_self');
}
}
flvvplayer.play();
html embedded code
<object id="module_video" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="450" width="600">
<param name="_cx" value="15875" />
<param name="_cy" value="9683" />
<param name="flashvars" value="myvar=video_file-module-1.flv"/>
<param name="movie" value="/flashskin.swf?myvar=video_file-module-1.flv" />
<param name="src" value="/flashskin.swf?myvar=video_file-module-1.flv" />
<param name="width" value="600" />
<param name="height" value="450" />
<param name="wmode" value="opaque" />
<param name="play" value="-1" />
<param name="loop" value="0" />
<param name="quality" value="high" />
<param name="id" value="module_video" />
<param name="salign" value="" />
<param name="menu" value="-1" />
<param name="base" value="" />
<param name="allowscriptaccess" value="always" />
<param name="scale" value="showall" />
<param name="devicefont" value="0" />
<param name="embedmovie" value="0" />
<param name="bgcolor" value="ffffff" />
<param name="swremote" value="" />
<param name="moviedata" value="" />
<param name="seamlesstabbing" value="1" />
<param name="profile" value="0" />
<param name="profileaddress" value="" />
<param name="profileport" value="0" />
<param name="allownetworking" value="all" />
<param name="allowfullscreen" value="false" />
<embed allowscriptaccess="always" src="/flashskin.swf?myvar=video_file-module-1.flv" height="450" width="600" play="false" loop="false" style="z-index:0;" wmode="opaque" quality="high" bgcolor="#ffffff" autoplay="false" align="" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>
More discussions in ActionScript 3
adobe
Comments
Post a Comment