Как воспроизвести видео сразу после его загрузки в ActionScript?
Есть сайт на котором автоматически воспроизводится SWF видео, но с задержкой 10-12 секунд, а мне нужно, чтобы оно начинало играть сразу после загрузки.
Раньше с ActionScript не работал и не получается у меня найти метод, который за это отвечает.
package noamcohen_fla
{
import fl.video.FLVPlayback;
import flash.display.MovieClip;
import flash.utils.Dictionary;
public dynamic class MainTimeline extends MovieClip
{
public var btnPlayPause:PlayPauseButton;
public var __setPropDict:Dictionary;
public var lastVisit:Object;
public var flvPlayer:FLVPlayback;
public var is24hoursUp:Boolean;
public var muteButton:MuteButton;
public var btnGotoWebsite:MovieClip;
public function MainTimeline()
{
this.__setPropDict = new Dictionary(true);
super();
addFrameScript(0,this.frame1,1,this.frame2);
}
public function removeAllCuePointsFromFLV() : *
{
var _loc1_:Object = null;
_loc1_ = new Object();
while(_loc1_ != null)
{
_loc1_ = this.flvPlayer.removeASCuePoint(1);
}
}
public function onFLVCuePoint(param1:Object) : *
{
trace("cuepoint : " + param1.info.name);
}
function frame1() : *
{
if(this.__setPropDict[this.flvPlayer] == undefined || int(this.__setPropDict[this.flvPlayer]) != 1)
{
this.__setPropDict[this.flvPlayer] = currentFrame;
this.__setProp_flvPlayer_Scene1_video_1();
}
this.lastVisit = new Object();
this.flvPlayer.bufferTime = Number(Number(0));
this.flvPlayer.playPauseButton = this.btnPlayPause;
this.flvPlayer.muteButton = this.muteButton;
this.btnPlayPause.buttonMode = true;
this.muteButton.buttonMode = true;
this.flvPlayer.addEventListener("cuePoint",this.onFLVCuePoint);
this.flvPlayer.source = "https://myoffshorecorporation.com/noamcohenintrokeyed.flv";
this.flvPlayer.addASCuePoint(104,"finished");
this.lastVisit = SharedObject.getLocal("userLastVisit");
stop();
}
function frame2() : *
{
stop();
navigateToURL(new URLRequest("javascript:hideWhenFinished(); void(0) ;"),"_self");
}
function __setProp_flvPlayer_Scene1_video_1() : *
{
try
{
this.flvPlayer["componentInspectorSetting"] = true;
}
catch(e:Error)
{
}
this.flvPlayer.align = "center";
this.flvPlayer.autoPlay = true;
this.flvPlayer.scaleMode = "maintainAspectRatio";
this.flvPlayer.skin = "";
this.flvPlayer.skinAutoHide = false;
this.flvPlayer.skinBackgroundAlpha = Number(Number(0.85));
this.flvPlayer.skinBackgroundColor = uint(uint(4697035));
this.flvPlayer.source = "https://myoffshorecorporation.com/noamcohenintrokeyed.flv";
this.flvPlayer.volume = Number(Number(1));
try
{
this.flvPlayer["componentInspectorSetting"] = false;
return;
}
catch(e:Error)
{
return;
}
}
}
}