Frame 1
my_nc = new NetConnection();
my_nc.connect(null);
_global.my_ns = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.setBufferTime(3);
my_ns.onStatus = function (infoObject) {
_root.pp.GNum = infoObject.code;
if (infoObject.code == "NetStream.Buffer.Empty") {
} else if (infoObject.code == "NetStream.Buffer.Full") {
} else if (infoObject.code == "NetStream.Play.Start") {
_global.MoviePlaying = true;
my_video._visible = true;
} else if (infoObject.code == "NetStream.Play.Stop") {
_global.MoviePlaying = false;
my_video._visible = false;
} else if (infoObject.code == "NetStream.Play.StreamNotFound") {
}
};
Instance of Symbol 3 MovieClip "pp" in Frame 1
onClipEvent (load) {
my_lc = new LocalConnection();
_global.MyDomain = my_lc.domain();
System.useCodepage = true;
_global.geturl_pic = function (uid, did) {
d = Number(uid) % 100;
return(((((((("http://" + _global.MyDomain) + "/p/") + d) + "/") + uid) + "/") + did) + ".jpg");
};
_global.geturl_flv = function (uid, did) {
d = Number(uid) % 100;
return(((((((("http://" + _global.MyDomain) + "/p/") + d) + "/") + uid) + "/") + did) + ".flv");
};
_global.isLoaded = 0;
_global.isStarted = 0;
_global.MoviePlaying = false;
_global.UserID = _root.uid;
_global.DiaryID = _root.did;
_global.PlayCount = 0;
}
onClipEvent (enterFrame) {
if (_global.MoviePlaying == true) {
_global.PlayCount++;
_root.pp.GNum = (((_global.PlayCount + "\uFF1A") + _global.PlayedTime) + "\uFF1A") + _global.my_ns.time;
if (_global.PlayCount > 90) {
_root.pp.GNum = (_global.PlayedTime + "\uFF1A") + _global.my_ns.time;
if (_global.PlayedTime == _global.my_ns.time) {
_global.my_ns.close();
_global.MoviePlaying = false;
_root.my_video._visible = false;
}
_global.PlayedTime = _global.my_ns.time;
_global.PlayCount = 0;
}
}
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
isLoaded = 1;
}
if ((isLoaded == 1) && (isStarted == 0)) {
isStarted = 1;
_root.Buffer.loadMovie(geturl_pic(_global.UserID, _global.DiaryID));
}
}
onClipEvent (data) {
}
Instance of Symbol 6 MovieClip "Buffer" in Frame 1
onClipEvent (load) {
var BarX;
var BarY;
_global.adLoadVars = new LoadVars();
_global.adLoadVars.onLoad = function (bSuccess) {
_global.adplay = false;
if (bSuccess) {
if ((this.adid > 0) && (this.adid != undefined)) {
my_ns.play(((("http://" + _global.MyDomain) + "/adflv/") + this.adid) + ".flv");
}
}
};
}
onClipEvent (enterFrame) {
if (_global.MoviePlaying) {
if (_root.BarImage._y != (_root.Buffer._y + _root.Buffer._height)) {
setProperty(_root.BarImage, _y , _root.BarImage._y + (((_root.Buffer._y + _root.Buffer._height) - _root.BarImage._y) / 2));
}
} else if (_root.BarImage._y != BarY) {
setProperty(_root.BarImage, _y , _root.BarImage._y - ((_root.BarImage._y - BarY) / 2));
}
}
onClipEvent (data) {
setProperty(_root.Buffer, _x , (_root._width - _root.Buffer._width) / 2);
setProperty(_root.Buffer, _y , (_root._height - _root.Buffer._height) / 2);
BarX = this._x - (_root.BarImage._width - this._width);
BarY = this._y + (this._height - _root.BarImage._height);
setProperty(_root.BarImage, _x , BarX);
setProperty(_root.my_video, _width , this._width);
setProperty(_root.my_video, _height , this._height);
setProperty(_root.my_video, _x , this._x);
setProperty(_root.my_video, _y , this._y);
setProperty(_root.mymask, _width , _root.Buffer._width);
setProperty(_root.mymask, _height , _root.Buffer._height);
setProperty(_root.mymask, _x , _root.Buffer._x);
setProperty(_root.mymask, _y , _root.Buffer._y);
_root.BarImage.useHandCursor = true;
}
Symbol 10 Button
on (press) {
my_ns.play(geturl_flv(_global.UserID, _global.DiaryID));
_global.MoviePlaying = true;
_global.adplay = true;
}