STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228034
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/83326702?noj=FRM83326702-20DC" width="1" height="1"></div>

Red Light District.swf

This is the info page for
Flash #180105

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 3 { } movieClip 5 VideoPlayer { #initclip Object.registerClass('VideoPlayer', mx.video.VideoPlayer); #endinitclip } movieClip 8 Icon { } movieClip 9 FLVPlayback { #initclip Object.registerClass('FLVPlayback', mx.video.FLVPlayback); #endinitclip frame 1 { stop(); } } frame 1 { DarkCover_mc._alpha = 95; var afterTonnelFlag = false; var darkFlag = true; Mouse.show(); stop(); var HouseQ = 18; var Houses = new Array(20); Houses[1] = District_mc.Building10_mc; Houses[2] = District_mc.Building12_mc; Houses[3] = District_mc.Building14_mc; Houses[4] = District_mc.Building16_mc; Houses[5] = District_mc.Building18_mc; Houses[6] = District_mc.Building20_mc; Houses[7] = District_mc.Building22_mc; Houses[8] = District_mc.Building24_mc; Houses[9] = District_mc.Building26_mc; Houses[10] = District_mc.Building28_mc; Houses[11] = District_mc.Building30_mc; Houses[12] = District_mc.Building32_mc; Houses[13] = District_mc.Building34_mc; Houses[14] = District_mc.Building36_mc; Houses[15] = District_mc.Building38_mc; Houses[16] = District_mc.Building40_mc; Houses[17] = District_mc.Building42_mc; Houses[18] = District_mc.Building44_mc; } frame 1 { LoadLine_mc.setMask(LoadMask_mc); var X_start = LoadMask_mc._x; var frmsLoaded = 0; var darkOff = true; PlayGamcore_btn._visible = false; GamcoreLink_mc.onRelease = function () { getURL('http://gamcore.com', '_blank'); }; var cc = 0; var sec = 0; var timelim = 1; var secProc = 0; LoadLine_mc.onEnterFrame = function () { ++cc; if (cc >= 5) { cc = 0; if (sec < timelim) { ++sec; secProc = (sec / timelim) * 100; } } frmsLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); if (frmsLoaded >= secProc) { LoadMask_mc._x = X_start + 1.45 * secProc; procLoad_txt.text = 'loading ' + secProc + '%'; if (secProc >= 100) { PlayGamcore_btn._visible = true; Dark_mc._visible = false; } } else { LoadMask_mc._x = X_start + 1.45 * frmsLoaded; procLoad_txt.text = 'loading ' + frmsLoaded + '%'; if (frmsLoaded >= 100) { PlayGamcore_btn._visible = true; Dark_mc._visible = false; } } }; PlayGamcore_btn.onRelease = function () { play(); }; ShadePreload_mc.onEnterFrame = function () { if (darkOff) { if (this._alpha > 70) { --this._alpha; } else { darkOff = false; } } else { if (this._alpha < 100) { ++this._alpha; } else { darkOff = true; } } }; } movieClip 28 { } movieClip 30 { frame 1 { function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } var lLim = randRange(40, 75); var lcc = 0; } frame 3 { ++lcc; if (lcc < lLim) { gotoAndPlay('c2'); } else {} } frame 10 { } frame 11 { ++lcc; if (lcc < lLim) { gotoAndPlay('CycE'); } else { lcc = 0; gotoAndPlay('lcyc2'); } } } // unknown tag 88 length 153 movieClip 34 { } movieClip 38 { } movieClip 43 { } movieClip 49 { } movieClip 52 { } // unknown tag 88 length 143 movieClip 59 { } movieClip 62 { } movieClip 63 { } movieClip 94 { } // unknown tag 88 length 171 // unknown tag 88 length 47 // unknown tag 88 length 153 movieClip 108 { } movieClip 111 { } // unknown tag 88 length 4 movieClip 120 { } movieClip 126 { frame 1 { stop(); } } movieClip 127 { frame 1 { function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } var Dleay = randRange(10, 30); var cc = 0; LampSine_mc.onEnterFrame = function () { ++cc; if (cc >= Dleay) { cc = 0; this.gotoAndPlay(2); } }; } } movieClip 128 { } movieClip 130 { } movieClip 132 { } movieClip 134 { } movieClip 137 { } movieClip 138 { } // unknown tag 88 length 138 movieClip 142 { } movieClip 144 { } movieClip 146 { } // unknown tag 88 length 86 movieClip 151 { } movieClip 1 __Packages.mx.video.FLVPlayback { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.FLVPlayback) { var v1 = function () { super(); mx.events.EventDispatcher.initialize(this); if (this._autoPlay == undefined) { this._autoPlay = true; } if (this._autoRewind == undefined) { this._autoRewind = true; } if (this._autoSize == undefined) { this._autoSize = false; } if (this._bufferTime == undefined) { this._bufferTime = 0.1; } if (this._contentPath == undefined) { this._contentPath = ''; } if (this._cuePoints == undefined) { this._cuePoints = null; } if (this._idleTimeout == undefined) { this._idleTimeout = mx.video.VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL; } if (this._isLive == undefined) { this._isLive = false; } if (this._aspectRatio == undefined) { this._aspectRatio = true; } if (this._seekToPrevOffset == undefined) { this._seekToPrevOffset = mx.video.FLVPlayback.SEEK_TO_PREV_OFFSET_DEFAULT; } if (this._playheadUpdateInterval == undefined) { this._playheadUpdateInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL; } if (this._progressInterval == undefined) { this._progressInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL; } if (this._totalTime == undefined) { this._totalTime = 0; } if (this._transform == undefined) { this._transform = null; } if (this._volume == undefined) { this._volume = 100; } if (this._skinAutoHide == undefined) { this._skinAutoHide = false; } if (this._bufferingBarHides == undefined) { this._bufferingBarHides = false; } this.__height = this._height; this._prevHeight = this.__height; this._origHeight = this.__height; this.__width = this._width; this._prevWidth = this.__width; this._origWidth = this.__width; this._scaleX = 100; this._scaleY = 100; this._xscale = 100; this._yscale = 100; this._preSeekTime = -1; this._firstStreamReady = false; this._firstStreamShown = false; this.createUIManager(); this._activeVP = 0; this._visibleVP = 0; this._topVP = 0; this._vp = new Array(); this._vpState = new Array(); this._cpMgr = new Array(); this.createVideoPlayer(0); this._vp[0].visible = false; this._vp[0].volume = 0; this.boundingBox_mc._visible = false; this.boundingBox_mc.unloadMovie(); delete this.boundingBox_mc; if (_global.isLivePreview) { this.createLivePreviewMovieClip(); this.setSize(this.__width, this.__height); } this._cpMgr[0].processCuePointsProperty(this._cuePoints); delete this._cuePoints; this._cuePoints = null; }; mx.video.FLVPlayback = v1; mx.video.FLVPlayback extends MovieClip; var v2 = v1.prototype; v2.setSize = function (w, h) { if (_global.isLivePreview) { if (this.preview_mc == undefined) { this.createLivePreviewMovieClip(); } this.preview_mc.box_mc._width = w; this.preview_mc.box_mc._height = h; if (this.preview_mc.box_mc._width < this.preview_mc.icon_mc._width || this.preview_mc.box_mc._height < this.preview_mc.icon_mc._height) { this.preview_mc.icon_mc._visible = false; } else { this.preview_mc.icon_mc._visible = true; this.preview_mc.icon_mc._x = (this.preview_mc.box_mc._width - this.preview_mc.icon_mc._width) / 2; this.preview_mc.icon_mc._y = (this.preview_mc.box_mc._height - this.preview_mc.icon_mc._height) / 2; } } if (w == this.__get__width() && h == this.__get__height()) { return undefined; } this.__width = w; this._prevWidth = this.__width; this.__height = h; this._prevHeight = this.__height; var v3 = 0; while (v3 < this._vp.length) { if (this._vp[v3] != undefined) { this._vp[v3].setSize(w, h); } ++v3; } this.dispatchEvent({'type': 'resize', 'x': this.__get__x(), 'y': this.__get__y(), 'width': w, 'height': h}); }; v2.setScale = function (xs, ys) { if (xs == this.__get__scaleX() && ys == this.__get__scaleY()) { return undefined; } this._scaleX = xs; this._scaleY = ys; var v2 = 0; while (v2 < this._vp.length) { if (this._vp[v2] != undefined) { this._vp[v2].setSize(this._origWidth * xs / 100, this._origHeight * ys / 100); } ++v2; } this.dispatchEvent({'type': 'resize', 'x': this.__get__x(), 'y': this.__get__y(), 'width': this.__get__width(), 'height': this.__get__height()}); }; v2.handleEvent = function (e) { var v3 = e.state; if (e.state != undefined && e.target._name == this._visibleVP && this.__get__scrubbing()) { v3 = mx.video.FLVPlayback.SEEKING; } if (e.type == 'metadataReceived') { this._cpMgr[e.target._name].processFLVCuePoints(e.info.cuePoints); this.dispatchEvent({'type': e.type, 'info': e.info, 'vp': e.target._name}); } else { if (e.type == 'cuePoint') { if (this._cpMgr[e.target._name].isFLVCuePointEnabled(e.info)) { this.dispatchEvent({'type': e.type, 'info': e.info, 'vp': e.target._name}); } } else { if (e.type == 'rewind') { this.dispatchEvent({'type': e.type, 'auto': true, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); this._cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime); } else { if (e.type == 'resize') { this.dispatchEvent({'type': e.type, 'x': this.__get__x(), 'y': this.__get__y(), 'width': this.__get__width(), 'height': this.__get__height(), 'auto': true, 'vp': e.target._name}); this._prevWidth = this.__width; this._prevHeight = this.__height; } else { if (e.type == 'playheadUpdate') { this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); if (this._preSeekTime >= 0 && e.target.state != mx.video.FLVPlayback.SEEKING) { var v5 = this._preSeekTime; this._preSeekTime = -1; this._cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime); this.dispatchEvent({'type': 'seek', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); if (v5 < e.playheadTime) { this.dispatchEvent({'type': 'fastForward', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); } else { if (v5 > e.playheadTime) { this.dispatchEvent({'type': 'rewind', 'auto': false, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); } } } this._cpMgr[e.target._name].dispatchASCuePoints(); } else { if (e.type == 'stateChange') { var v4 = e.target._name; if (v4 == this._visibleVP && this.__get__scrubbing()) { return undefined; } if (e.state == mx.video.VideoPlayer.RESIZING) { return undefined; } if (this._vpState[v4].prevState == mx.video.FLVPlayback.LOADING && this._vpState[v4].autoPlay && e.state == mx.video.FLVPlayback.STOPPED) { return undefined; } this._vpState[v4].prevState = e.state; this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); if (this._vp[e.target._name].state != v3) { return undefined; } switch (v3) { case mx.video.FLVPlayback.BUFFERING: this.dispatchEvent({'type': 'buffering', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); break; case mx.video.FLVPlayback.PAUSED: this.dispatchEvent({'type': 'paused', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); break; case mx.video.FLVPlayback.PLAYING: this.dispatchEvent({'type': 'playing', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); break; case mx.video.FLVPlayback.STOPPED: this.dispatchEvent({'type': 'stopped', 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); } } else { if (e.type == 'progress') { this.dispatchEvent({'type': e.type, 'bytesLoaded': e.bytesLoaded, 'bytesTotal': e.bytesTotal, 'vp': e.target._name}); } else { if (e.type == 'ready') { var v4 = e.target._name; if (!this._firstStreamReady) { if (v4 == this._visibleVP) { this._firstStreamReady = true; if (this._uiMgr.__get__skinReady() && !this._firstStreamShown) { this._uiMgr.__set__visible(true); this.showFirstStream(); } } } else { if (this._firstStreamShown && v3 == mx.video.FLVPlayback.STOPPED && this._vpState[v4].autoPlay) { this._vp[v4].play(); } } this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); } else { if (e.type == 'close' || e.type == 'complete') { this.dispatchEvent({'type': e.type, 'state': v3, 'playheadTime': e.playheadTime, 'vp': e.target._name}); } } } } } } } } } }; v2.load = function (contentPath, totalTime, isLive) { if (this._vp[this._activeVP] == undefined) { return undefined; } if (contentPath == undefined || contentPath == null || contentPath == '') { return undefined; } this.__set__autoPlay(false); if (totalTime != undefined) { this.__set__totalTime(totalTime); } if (isLive != undefined) { this.__set__isLive(isLive); } this.__set__contentPath(contentPath); }; v2.play = function (contentPath, totalTime, isLive) { if (this._vp[this._activeVP] == undefined) { return undefined; } if (contentPath == undefined) { this._vp[this._activeVP].play(); } else { this.__set__autoPlay(true); if (totalTime != undefined) { this.__set__totalTime(totalTime); } if (isLive != undefined) { this.__set__isLive(isLive); } this.__set__contentPath(contentPath); } }; v2.pause = function () { if (this._vp[this._activeVP] == undefined) { return undefined; } this._vp[this._activeVP].pause(); }; v2.stop = function () { if (this._vp[this._activeVP] == undefined) { return undefined; } this._vp[this._activeVP].stop(); }; v2.seek = function (time) { if (this._vp[this._activeVP] == undefined) { return undefined; } this._preSeekTime = this.playheadTime; this._vp[this._activeVP].seek(time); }; v2.seekSeconds = function (time) { this.seek(time); }; v2.seekPercent = function (percent) { if (this._vp[this._activeVP] == undefined) { return undefined; } if (percent < 0 || percent > 100 || this._vp[this._activeVP].totalTime == undefined || this._vp[this._activeVP].totalTime == null || this._vp[this._activeVP].totalTime <= 0) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK); } this.seek(this._vp[this._activeVP].totalTime * percent / 100); }; v2.__get__playheadPercentage = function () { if (this._vp[this._activeVP].totalTime == undefined || this._vp[this._activeVP].totalTime == null || this._vp[this._activeVP].totalTime <= 0) { return undefined; } return (this._vp[this._activeVP].playheadTime / this._vp[this._activeVP].totalTime) * 100; }; v2.__set__playheadPercentage = function (percent) { this.seekPercent(percent); return this.__get__playheadPercentage(); }; v2.seekToNavCuePoint = function (timeNameOrCuePoint) { var v3; switch (typeof timeNameOrCuePoint) { case 'string': v3 = {'name': timeNameOrCuePoint}; break; case 'number': v3 = {'time': timeNameOrCuePoint}; break; case 'object': v3 = timeNameOrCuePoint; } if (v3.name == null || v3.name == undefined || typeof v3.name != 'string') { this.seekToNextNavCuePoint(v3.time); return undefined; } if (isNaN(v3.time)) { v3.time = 0; } var v2 = this.findNearestCuePoint(timeNameOrCuePoint, mx.video.FLVPlayback.NAVIGATION); for (;;) { if (!(v2 != null && (v2.time < v3.time || !this.isFLVCuePointEnabled(v2)))) break; v2 = this.findNextCuePointWithName(v2); } if (v2 == null) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK); } this.seek(v2.time); }; v2.seekToNextNavCuePoint = function (time) { if (this._vp[this._activeVP] == undefined) { return undefined; } if (isNaN(time) || time < 0) { time = this._vp[this._activeVP].playheadTime + 0.001; } var v3; v3 = this.findNearestCuePoint(time, mx.video.FLVPlayback.NAVIGATION); if (v3 == null) { this.seek(this._vp[this._activeVP].totalTime); return undefined; } var v2 = v3.index; if (v3.time < time) { ++v2; } for (;;) { if (!(v2 < v3.array.length && !this.isFLVCuePointEnabled(v3.array[v2]))) break; ++v2; } if (v2 >= v3.array.length) { var v5 = this._vp[this._activeVP].totalTime; if (v3.array[v3.array.length - 1].time > v5) { v5 = v3.array[v3.array.length - 1]; } this.seek(v5); } else { this.seek(v3.array[v2].time); } }; v2.seekToPrevNavCuePoint = function (time) { if (this._vp[this._activeVP] == undefined) { return undefined; } if (isNaN(time) || time < 0) { time = this._vp[this._activeVP].playheadTime; } var v3 = this.findNearestCuePoint(time, mx.video.FLVPlayback.NAVIGATION); if (v3 == null) { this.seek(0); return undefined; } var v2 = v3.index; for (;;) { if (!(v2 >= 0 && (!this.isFLVCuePointEnabled(v3.array[v2]) || v3.array[v2].time >= time - this._seekToPrevOffset))) break; --v2; } if (v2 < 0) { this.seek(0); } else { this.seek(v3.array[v2].time); } }; v2.addASCuePoint = function (timeOrCuePoint, name, parameters) { return this._cpMgr[this._activeVP].addASCuePoint(timeOrCuePoint, name, parameters); }; v2.removeASCuePoint = function (timeNameOrCuePoint) { return this._cpMgr[this._activeVP].removeASCuePoint(timeNameOrCuePoint); }; v2.findCuePoint = function (timeNameOrCuePoint, type) { switch (type) { return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, false, timeNameOrCuePoint); case 'event': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].eventCuePoints, false, timeNameOrCuePoint); case 'navigation': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].navCuePoints, false, timeNameOrCuePoint); case 'flv': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].flvCuePoints, false, timeNameOrCuePoint); case 'actionscript': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].asCuePoints, false, timeNameOrCuePoint); case 'all': } return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, false, timeNameOrCuePoint); }; v2.findNearestCuePoint = function (timeNameOrCuePoint, type) { switch (type) { return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, true, timeNameOrCuePoint); case 'event': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].eventCuePoints, true, timeNameOrCuePoint); case 'navigation': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].navCuePoints, true, timeNameOrCuePoint); case 'flv': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].flvCuePoints, true, timeNameOrCuePoint); case 'actionscript': return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].asCuePoints, true, timeNameOrCuePoint); case 'all': } return this._cpMgr[this._activeVP].getCuePoint(this._cpMgr[this._activeVP].allCuePoints, true, timeNameOrCuePoint); }; v2.findNextCuePointWithName = function (cuePoint) { return this._cpMgr[this._activeVP].getNextCuePointWithName(cuePoint); }; v2.setFLVCuePointEnabled = function (enabled, timeNameOrCuePoint) { return this._cpMgr[this._activeVP].setFLVCuePointEnabled(enabled, timeNameOrCuePoint); }; v2.isFLVCuePointEnabled = function (timeNameOrCuePoint) { return this._cpMgr[this._activeVP].isFLVCuePointEnabled(timeNameOrCuePoint); }; v2.getNextHighestDepth = function () { var v2 = super.getNextHighestDepth(); return v2 < 1000 ? 1000 : v2; }; v2.bringVideoPlayerToFront = function (index) { if (index == this._topVP || this._vp[index] == undefined) { return undefined; } this._vp[this._topVP].swapDepths(this._vp[index].getDepth()); this._topVP = index; }; v2.getVideoPlayer = function (index) { return this._vp[index]; }; v2.closeVideoPlayer = function (index) { if (this._vp[index] == undefined) { return undefined; } if (index == 0) { throw new mx.video.VideoError(mx.video.VideoError.DELETE_DEFAULT_PLAYER); } if (this._visibleVP == index) { this.__set__visibleVideoPlayerIndex(0); } if (this._activeVP == index) { this.__set__activeVideoPlayerIndex(0); } this._vp[index].close(); this._vp[index].unloadMovie(); delete this._vp[index]; this._vp[index] = undefined; }; v2.__get__activeVideoPlayerIndex = function () { return this._activeVP; }; v2.__set__activeVideoPlayerIndex = function (i) { if (this._activeVP == i) { return undefined; } if (this._vp[this._activeVP].onEnterFrame != undefined) { this.doContentPathConnect(); } this._activeVP = i; if (this._vp[this._activeVP] == undefined) { this.createVideoPlayer(this._activeVP); this._vp[this._activeVP].visible = false; this._vp[this._activeVP].volume = 0; } return this.__get__activeVideoPlayerIndex(); }; v2.__get__autoPlay = function () { if (this._vpState[this._activeVP] == undefined) { return this._autoPlay; } return this._vpState[this._activeVP].autoPlay; }; v2.__set__autoPlay = function (flag) { if (this._activeVP == 0 || this._activeVP == undefined) { this._autoPlay = flag; } this._vpState[this._activeVP].autoPlay = flag; return this.__get__autoPlay(); }; v2.__get__autoRewind = function () { if (this._vp[this._activeVP] == undefined) { return this._autoRewind; } return this._vp[this._activeVP].autoRewind; }; v2.__set__autoRewind = function (flag) { if (this._activeVP == 0 || this._activeVP == undefined) { this._autoRewind = flag; } this._vp[this._activeVP].autoRewind = flag; return this.__get__autoRewind(); }; v2.__get__autoSize = function () { if (this._vp[this._activeVP] == undefined) { return this._autoSize; } return this._vp[this._activeVP].autoSize; }; v2.__set__autoSize = function (flag) { if (this._activeVP == 0 || this._activeVP == undefined) { this._autoSize = flag; } this._vp[this._activeVP].autoSize = flag; return this.__get__autoSize(); }; v2.__get__bitrate = function () { return (this.__get__ncMgr()).getBitrate(); }; v2.__set__bitrate = function (b) { (this.__get__ncMgr()).setBitrate(b); return this.__get__bitrate(); }; v2.__get__buffering = function () { if (this._vp[this._activeVP] == undefined) { return false; } return this._vp[this._activeVP].state == mx.video.FLVPlayback.BUFFERING; }; v2.__get__bufferingBar = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._bufferingBar = this._uiMgr.getControl(mx.video.UIManager.BUFFERING_BAR); } return this._bufferingBar; }; v2.__set__bufferingBar = function (s) { this._bufferingBar = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, s); } return this.__get__bufferingBar(); }; v2.__get__bufferingBarHidesAndDisablesOthers = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._bufferingBarHides = this._uiMgr.bufferingBarHidesAndDisablesOthers; } return this._bufferingBarHides; }; v2.__set__bufferingBarHidesAndDisablesOthers = function (b) { this._bufferingBarHides = b; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.__set__bufferingBarHidesAndDisablesOthers(b); } return this.__get__bufferingBarHidesAndDisablesOthers(); }; v2.__get__backButton = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._backButton = this._uiMgr.getControl(mx.video.UIManager.BACK_BUTTON); } return this._backButton; }; v2.__set__backButton = function (s) { this._backButton = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, s); } return this.__get__backButton(); }; v2.__get__bufferTime = function () { if (this._vp[this._activeVP] == undefined) { return this._bufferTime; } return this._vp[this._activeVP].bufferTime; }; v2.__set__bufferTime = function (aTime) { if (this._activeVP == 0 || this._activeVP == undefined) { this._bufferTime = aTime; } this._vp[this._activeVP].bufferTime = aTime; return this.__get__bufferTime(); }; v2.__get__bytesLoaded = function () { return this._vp[this._activeVP].bytesLoaded; }; v2.__get__bytesTotal = function () { return this._vp[this._activeVP].bytesTotal; }; v2.__get__contentPath = function () { if (this._vp[this._activeVP] == undefined || this._vp[this._activeVP].onEnterFrame != undefined) { return this._contentPath; } return this._vp[this._activeVP].url; }; v2.__set__contentPath = function (url) { if (_global.isLivePreview) { return undefined; } if (this._vp[this._activeVP] == undefined) { if (url == this._contentPath) { return undefined; } this._contentPath = url; } else { if (this._vp[this._activeVP].url == url) { return undefined; } this._vpState[this._activeVP].minProgressPercent = undefined; if (this._vp[this._activeVP].onEnterFrame != undefined) { delete this._vp[this._activeVP].onEnterFrame; this._vp[this._activeVP].onEnterFrame = undefined; } this._cpMgr[this._activeVP].reset(); if (this._vpState[this._activeVP].autoPlay && this._firstStreamShown) { this._vp[this._activeVP].play(url, this._vpState[this._activeVP].isLive, this._vpState[this._activeVP].totalTime); } else { this._vp[this._activeVP].load(url, this._vpState[this._activeVP].isLive, this._vpState[this._activeVP].totalTime); } this._vpState[this._activeVP].isLiveSet = false; this._vpState[this._activeVP].totalTimeSet = false; } return this.__get__contentPath(); }; v2.__set__cuePoints = function (cp) { if (this._cuePoints != undefined) { return undefined; } this._cuePoints = cp; return this.__get__cuePoints(); }; v2.__get__forwardButton = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._forwardButton = this._uiMgr.getControl(mx.video.UIManager.FORWARD_BUTTON); } return this._forwardButton; }; v2.__set__forwardButton = function (s) { this._forwardButton = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, s); } return this.__get__forwardButton(); }; v2.__get__height = function () { if (_global.isLivePreview) { return this.__height; } if (this._vp[this._visibleVP] != undefined) { this.__height = this._vp[this._visibleVP].height; } return this.__height; }; v2.__set__height = function (h) { this.setSize(this.__get__width(), h); return this.__get__height(); }; v2.__get__idleTimeout = function () { if (this._vp[this._activeVP] == undefined) { return this._idleTimeout; } return this._vp[this._activeVP].idleTimeout; }; v2.__set__idleTimeout = function (aTime) { if (this._activeVP == 0 || this._activeVP == undefined) { this._idleTimeout = aTime; } this._vp[this._activeVP].idleTimeout = aTime; return this.__get__idleTimeout(); }; v2.__get__isRTMP = function () { if (_global.isLivePreview) { return true; } if (this._vp[this._activeVP] == undefined) { return undefined; } return this._vp[this._activeVP].isRTMP; }; v2.__get__isLive = function () { if (this._vp[this._activeVP] == undefined) { return this._isLive; } else { if (this._vpState[this._activeVP].isLiveSet) { return this._vpState[this._activeVP].isLive; } else { return this._vp[this._activeVP].isLive; } } }; v2.__set__isLive = function (flag) { if (this._activeVP == 0 || this._activeVP == undefined) { this._isLive = flag; } this._vpState[this._activeVP].isLive = flag; this._vpState[this._activeVP].isLiveSet = true; return this.__get__isLive(); }; v2.__get__maintainAspectRatio = function () { if (this._vp[this._activeVP] == undefined) { return this._aspectRatio; } return this._vp[this._activeVP].maintainAspectRatio; }; v2.__set__maintainAspectRatio = function (flag) { if (this._activeVP == 0 || this._activeVP == undefined) { this._aspectRatio = flag; } this._vp[this._activeVP].maintainAspectRatio = flag; return this.__get__maintainAspectRatio(); }; v2.__get__metadata = function () { if (this._vp[this._activeVP] == undefined) { return null; } return this._vp[this._activeVP].metadata; }; v2.__get__metadataLoaded = function () { if (this._vp[this._activeVP] == undefined) { return false; } return this._cpMgr[this._activeVP].metadataLoaded; }; v2.__get__muteButton = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._muteButton = this._uiMgr.getControl(mx.video.UIManager.MUTE_BUTTON); } return this._muteButton; }; v2.__set__muteButton = function (s) { this._muteButton = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, s); } return this.__get__muteButton(); }; v2.__get__ncMgr = function () { if (this._vp[this._activeVP] == undefined) { return null; } return this._vp[this._activeVP].ncMgr; }; v2.__get__pauseButton = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._pauseButton = this._uiMgr.getControl(mx.video.UIManager.PAUSE_BUTTON); } return this._pauseButton; }; v2.__set__pauseButton = function (s) { this._pauseButton = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, s); } return this.__get__pauseButton(); }; v2.__get__paused = function () { if (this._vp[this._activeVP] == undefined) { return false; } return this._vp[this._activeVP].state == mx.video.FLVPlayback.PAUSED; }; v2.__get__playButton = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._playButton = this._uiMgr.getControl(mx.video.UIManager.PLAY_BUTTON); } return this._playButton; }; v2.__set__playButton = function (s) { this._playButton = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, s); } return this.__get__playButton(); }; v2.__get__playheadTime = function () { if (this._vp[this._activeVP] == undefined) { return 0; } return this._vp[this._activeVP].playheadTime; }; v2.__set__playheadTime = function (position) { this.seek(position); return this.__get__playheadTime(); }; v2.__get__playheadUpdateInterval = function () { if (this._vp[this._activeVP] == undefined) { return this._playheadUpdateInterval; } return this._vp[this._activeVP].playheadUpdateInterval; }; v2.__set__playheadUpdateInterval = function (aTime) { if (this._activeVP == 0 || this._activeVP == undefined) { this._playheadUpdateInterval = aTime; } this._cpMgr[this._activeVP].playheadUpdateInterval = aTime; this._vp[this._activeVP].playheadUpdateInterval = aTime; return this.__get__playheadUpdateInterval(); }; v2.__get__playing = function () { if (this._vp[this._activeVP] == undefined) { return false; } return this._vp[this._activeVP].state == mx.video.FLVPlayback.PLAYING; }; v2.__get__playPauseButton = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._playPauseButton = this._uiMgr.getControl(mx.video.UIManager.PLAY_PAUSE_BUTTON); } return this._playPauseButton; }; v2.__set__playPauseButton = function (s) { this._playPauseButton = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, s); } return this.__get__playPauseButton(); }; v2.__get__preferredHeight = function () { if (this._vp[this._activeVP] == undefined) { return 0; } return this._vp[this._activeVP].videoHeight; }; v2.__get__preferredWidth = function () { if (this._vp[this._activeVP] == undefined) { return 0; } return this._vp[this._activeVP].videoWidth; }; v2.__get__progressInterval = function () { if (this._vp[this._activeVP] == undefined) { return this._progressInterval; } return this._vp[this._activeVP].progressInterval; }; v2.__set__progressInterval = function (aTime) { if (this._activeVP == 0 || this._activeVP == undefined) { this._progressInterval = aTime; } this._vp[this._activeVP].progressInterval = aTime; return this.__get__progressInterval(); }; v2.__get__scaleX = function () { if (this._vp[this._visibleVP] != undefined) { this._scaleX = (this._vp[this._visibleVP].width / this._origWidth) * 100; } return this._scaleX; }; v2.__set__scaleX = function (xs) { this.setScale(xs, this.__get__scaleY()); return this.__get__scaleX(); }; v2.__get__scaleY = function () { if (this._vp[this._visibleVP] != undefined) { this._scaleY = (this._vp[this._visibleVP].height / this._origHeight) * 100; } return this._scaleY; }; v2.__set__scaleY = function (ys) { this.setScale(this.__get__scaleX(), ys); return this.__get__scaleY(); }; v2.__get__scrubbing = function () { var v2 = this.__get__seekBar(); if (v2 == undefined || v2.isDragging == undefined) { return false; } return v2.isDragging; }; v2.__get__seekBar = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._seekBar = this._uiMgr.getControl(mx.video.UIManager.SEEK_BAR); } return this._seekBar; }; v2.__set__seekBar = function (s) { this._seekBar = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.SEEK_BAR, s); } return this.__get__seekBar(); }; v2.__get__seekBarInterval = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._seekBarInterval = this._uiMgr.seekBarInterval; } return this._seekBarInterval; }; v2.__set__seekBarInterval = function (s) { this._seekBarInterval = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.__set__seekBarInterval(this._seekBarInterval); } return this.__get__seekBarInterval(); }; v2.__get__seekBarScrubTolerance = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._seekBarScrubTolerance = this._uiMgr.seekBarScrubTolerance; } return this._seekBarScrubTolerance; }; v2.__set__seekBarScrubTolerance = function (s) { this._seekBarScrubTolerance = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.__set__seekBarScrubTolerance(this._seekBarScrubTolerance); } return this.__get__seekBarScrubTolerance(); }; v2.__get__seekToPrevOffset = function () { return this._seekToPrevOffset; }; v2.__set__seekToPrevOffset = function (s) { this._seekToPrevOffset = s; return this.__get__seekToPrevOffset(); }; v2.__get__skin = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._skin = this._uiMgr.skin; } return this._skin; }; v2.__set__skin = function (s) { this._skin = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.__set__skin(s); } return this.__get__skin(); }; v2.__get__skinAutoHide = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._skinAutoHide = this._uiMgr.skinAutoHide; } return this._skinAutoHide; }; v2.__set__skinAutoHide = function (b) { if (_global.isLivePreview) { return undefined; } this._skinAutoHide = b; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.__set__skinAutoHide(b); } return this.__get__skinAutoHide(); }; v2.__get__transform = function () { return this._transform; }; v2.__set__transform = function (s) { this._transform = s; if (this._vp[this._activeVP] != undefined) { this._vp[this._activeVP].transform = this._transform; } return this.__get__transform(); }; v2.__get__state = function () { if (_global.isLivePreview) { return mx.video.FLVPlayback.STOPPED; } if (this._vp[this._activeVP] == undefined) { return mx.video.FLVPlayback.DISCONNECTED; } if (this._activeVP == this._visibleVP && this.__get__scrubbing()) { return mx.video.FLVPlayback.SEEKING; } var v3 = this._vp[this._activeVP].state; if (v3 == mx.video.VideoPlayer.RESIZING) { return mx.video.FLVPlayback.LOADING; } if (this._vpState[this._activeVP].prevState == mx.video.FLVPlayback.LOADING && this._vpState[this._activeVP].autoPlay && v3 == mx.video.FLVPlayback.STOPPED) { return mx.video.FLVPlayback.LOADING; } return v3; }; v2.__get__stateResponsive = function () { if (this._vp[this._activeVP] == undefined) { return false; } return this._vp[this._activeVP].stateResponsive; }; v2.__get__stopButton = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._stopButton = this._uiMgr.getControl(mx.video.UIManager.STOP_BUTTON); } return this._stopButton; }; v2.__set__stopButton = function (s) { this._stopButton = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, s); } return this.__get__stopButton(); }; v2.__get__stopped = function () { if (this._vp[this._activeVP] == undefined) { return false; } return this._vp[this._activeVP].state == mx.video.FLVPlayback.STOPPED; }; v2.__get__totalTime = function () { if (_global.isLivePreview) { return 1; } if (this._vp[this._activeVP] == undefined) { return this._totalTime; } else { if (this._vpState[this._activeVP].totalTimeSet) { return this._vpState[this._activeVP].totalTime; } else { return this._vp[this._activeVP].totalTime; } } }; v2.__set__totalTime = function (aTime) { if (this._activeVP == 0 || this._activeVP == undefined) { this._totalTime = aTime; } this._vpState[this._activeVP].totalTime = aTime; this._vpState[this._activeVP].totalTimeSet = true; return this.__get__totalTime(); }; v2.__get__version_1_0_1 = function () { return ''; }; v2.__set__version_1_0_1 = function (v) { return this.__get__version_1_0_1(); }; v2.__get__visible = function () { return this._visible; }; v2.__set__visible = function (v) { this._visible = v; return this.__get__visible(); }; v2.__get__visibleVideoPlayerIndex = function () { return this._visibleVP; }; v2.__set__visibleVideoPlayerIndex = function (i) { if (this._visibleVP == i) { return undefined; } var v2 = this._visibleVP; if (this._vp[i] == undefined) { this.createVideoPlayer(i); } var v5 = this._vp[i].height != this._vp[this._visibleVP].height || this._vp[i].width != this._vp[this._visibleVP].width; this._vp[this._visibleVP].visible = false; this._vp[this._visibleVP].volume = 0; this._visibleVP = i; if (this._firstStreamShown) { this._uiMgr.setupSkinAutoHide(v2); this._vp[this._visibleVP].visible = true; if (!this.__get__scrubbing()) { this._vp[this._visibleVP].volume = this._volume; } } else { if (this._vp[this._visibleVP].stateResponsive && this._vp[this._visibleVP].state != mx.video.FLVPlayback.DISCONNECTED && this._uiMgr.__get__skinReady()) { this._uiMgr.__set__visible(true); this._uiMgr.setupSkinAutoHide(v2); this._firstStreamReady = true; this.showFirstStream(); } } if (this._vp[v2].height != this._vp[this._visibleVP].height || this._vp[v2].width != this._vp[this._visibleVP].width) { this.dispatchEvent({'type': 'resize', 'x': this.__get__x(), 'y': this.__get__y(), 'width': this.__get__width(), 'height': this.__get__height(), 'auto': false, 'vp': this._visibleVP}); } this._uiMgr.handleEvent({'type': 'stateChange', 'state': this._vp[this._visibleVP].state, 'vp': this._visibleVP}); this._uiMgr.handleEvent({'type': 'playheadUpdate', 'playheadTime': this._vp[this._visibleVP].playheadTime, 'vp': this._visibleVP}); if (this._vp[this._visibleVP].isRTMP) { this._uiMgr.handleEvent({'type': 'ready', 'vp': this._visibleVP}); } else { this._uiMgr.handleEvent({'type': 'progress', 'bytesLoaded': this._vp[this._visibleVP].bytesLoaded, 'bytesTotal': this._vp[this._visibleVP].bytesTotal, 'vp': this._visibleVP}); } return this.__get__visibleVideoPlayerIndex(); }; v2.__get__volume = function () { return this._volume; }; v2.__set__volume = function (aVol) { if (this._volume == aVol) { return undefined; } this._volume = aVol; if (!this.__get__scrubbing()) { this._vp[this._visibleVP].volume = this._volume; } this.dispatchEvent({'type': 'volumeUpdate', 'volume': aVol}); return this.__get__volume(); }; v2.__get__volumeBar = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._volumeBar = this._uiMgr.getControl(mx.video.UIManager.VOLUME_BAR); } return this._volumeBar; }; v2.__set__volumeBar = function (s) { this._volumeBar = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, s); } return this.__get__volumeBar(); }; v2.__get__volumeBarInterval = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._volumeBarInterval = this._uiMgr.volumeBarInterval; } return this._volumeBarInterval; }; v2.__set__volumeBarInterval = function (s) { this._volumeBarInterval = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.__set__volumeBarInterval(this._volumeBarInterval); } return this.__get__volumeBarInterval(); }; v2.__get__volumeBarScrubTolerance = function () { if (this._uiMgr != null && this._uiMgr != undefined) { this._volumeBarScrubTolerance = this._uiMgr.volumeBarScrubTolerance; } return this._volumeBarScrubTolerance; }; v2.__set__volumeBarScrubTolerance = function (s) { this._volumeBarScrubTolerance = s; if (this._uiMgr != null && this._uiMgr != undefined) { this._uiMgr.__set__volumeBarScrubTolerance(this._volumeBarScrubTolerance); } return this.__get__volumeBarScrubTolerance(); }; v2.__get__width = function () { if (_global.isLivePreview) { return this.__width; } if (this._vp[this._visibleVP] != undefined) { this.__width = this._vp[this._visibleVP].width; } return this.__width; }; v2.__set__width = function (w) { this.setSize(w, this.__get__height()); return this.__get__width(); }; v2.__get__x = function () { return this._x; }; v2.__set__x = function (xpos) { this._x = xpos; return this.__get__x(); }; v2.__get__y = function () { return this._y; }; v2.__set__y = function (ypos) { this._y = ypos; return this.__get__y(); }; v2.createVideoPlayer = function (index) { if (_global.isLivePreview) { return undefined; } var v4 = this.__get__width(); var v5 = this.__get__height(); this._vp[index] = mx.video.VideoPlayer(this.attachMovie('VideoPlayer', String(index), mx.video.FLVPlayback.VP_DEPTH_OFFSET + index)); this._vp[index].setSize(v4, v5); this._topVP = index; this._vp[index].autoRewind = this._autoRewind; this._vp[index].autoSize = this._autoSize; this._vp[index].bufferTime = this._bufferTime; this._vp[index].idleTimeout = this._idleTimeout; this._vp[index].maintainAspectRatio = this._aspectRatio; this._vp[index].playheadUpdateInterval = this._playheadUpdateInterval; this._vp[index].progressInterval = this._progressInterval; this._vp[index].transform = this._transform; this._vp[index].volume = this._volume; if (index == 0) { this._vpState[index] = {'id': index, 'isLive': this._isLive, 'isLiveSet': true, 'totalTime': this._totalTime, 'totalTimeSet': true, 'autoPlay': this._autoPlay}; if (this._contentPath != null && this._contentPath != undefined && this._contentPath != '') { this._vp[index].onEnterFrame = mx.utils.Delegate.create(this, this.doContentPathConnect); } } else { this._vpState[index] = {'id': index, 'isLive': false, 'isLiveSet': true, 'totalTime': 0, 'totalTimeSet': true, 'autoPlay': false}; } this._vp[index].addEventListener('resize', this); this._vp[index].addEventListener('close', this); this._vp[index].addEventListener('complete', this); this._vp[index].addEventListener('cuePoint', this); this._vp[index].addEventListener('playheadUpdate', this); this._vp[index].addEventListener('progress', this); this._vp[index].addEventListener('metadataReceived', this); this._vp[index].addEventListener('stateChange', this); this._vp[index].addEventListener('ready', this); this._vp[index].addEventListener('rewind', this); this._cpMgr[index] = new mx.video.CuePointManager(this, index); this._cpMgr[index].playheadUpdateInterval = this._playheadUpdateInterval; }; v2.createUIManager = function () { this._uiMgr = new mx.video.UIManager(this); this._uiMgr.__set__visible(false); if (this._backButton != undefined && this._backButton != null) { this._uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, this._backButton); } if (this._bufferingBar != undefined && this._bufferingBar != null) { this._uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, this._bufferingBar); } this._uiMgr.__set__bufferingBarHidesAndDisablesOthers(this._bufferingBarHides); if (this._forwardButton != undefined && this._forwardButton != null) { this._uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, this._forwardButton); } if (this._pauseButton != undefined && this._pauseButton != null) { this._uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, this._pauseButton); } if (this._playButton != undefined && this._playButton != null) { this._uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, this._playButton); } if (this._playPauseButton != undefined && this._playPauseButton != null) { this._uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, this._playPauseButton); } if (this._stopButton != undefined && this._stopButton != null) { this._uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, this._stopButton); } if (this._seekBar != undefined && this._seekBar != null) { this._uiMgr.setControl(mx.video.UIManager.SEEK_BAR, this._seekBar); } if (this._seekBarInterval != undefined && this._seekBarInterval != null) { this._uiMgr.__set__seekBarInterval(this._seekBarInterval); } if (this._seekBarScrubTolerance != undefined && this._seekBarScrubTolerance != null) { this._uiMgr.__set__seekBarScrubTolerance(this._seekBarScrubTolerance); } if (this._skin != undefined && this._skin != null) { this._uiMgr.__set__skin(this._skin); } if (this._skinAutoHide != undefined && this._skinAutoHide != null) { this._uiMgr.__set__skinAutoHide(this._skinAutoHide); } if (this._muteButton != undefined && this._muteButton != null) { this._uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, this._muteButton); } if (this._volumeBar != undefined && this._volumeBar != null) { this._uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, this._volumeBar); } if (this._volumeBarInterval != undefined && this._volumeBarInterval != null) { this._uiMgr.__set__volumeBarInterval(this._volumeBarInterval); } if (this._volumeBarScrubTolerance != undefined && this._volumeBarScrubTolerance != null) { this._uiMgr.__set__volumeBarScrubTolerance(this._volumeBarScrubTolerance); } }; v2.createLivePreviewMovieClip = function () { this.preview_mc = this.createEmptyMovieClip('preview_mc', 10); this.preview_mc.createEmptyMovieClip('box_mc', 10); this.preview_mc.box_mc.beginFill(0); this.preview_mc.box_mc.moveTo(0, 0); this.preview_mc.box_mc.lineTo(0, 100); this.preview_mc.box_mc.lineTo(100, 100); this.preview_mc.box_mc.lineTo(100, 0); this.preview_mc.box_mc.lineTo(0, 0); this.preview_mc.box_mc.endFill(); this.preview_mc.attachMovie('Icon', 'icon_mc', 20); }; v2.doContentPathConnect = function () { delete this._vp[0].onEnterFrame; this._vp[0].onEnterFrame = undefined; if (_global.isLivePreview) { return undefined; } if (this._vpState[0].autoPlay && this._firstStreamShown) { this._vp[0].play(this._contentPath, this._isLive, this._totalTime); } else { this._vp[0].load(this._contentPath, this._isLive, this._totalTime); } this._vpState[0].isLiveSet = false; this._vpState[0].totalTimeSet = false; }; v2.showFirstStream = function () { this._firstStreamShown = true; this._vp[this._visibleVP].visible = true; if (!this.__get__scrubbing()) { this._vp[this._visibleVP].volume = this._volume; } var v2 = 0; while (v2 < this._vp.length) { if (this._vp[v2] != undefined && this._vp[v2].state == mx.video.FLVPlayback.STOPPED && this._vpState[v2].autoPlay) { this._vp[v2].play(); } ++v2; } }; v2._scrubStart = function () { var v2 = this.__get__playheadTime(); this._vp[this._visibleVP].volume = 0; this.dispatchEvent({'type': 'stateChange', 'state': mx.video.FLVPlayback.SEEKING, 'playheadTime': v2, 'vp': this._visibleVP}); this.dispatchEvent({'type': 'scrubStart', 'state': mx.video.FLVPlayback.SEEKING, 'playheadTime': v2}); }; v2._scrubFinish = function () { var v3 = this.__get__playheadTime(); var v2 = this.__get__state(); this._vp[this._visibleVP].volume = this._volume; if (v2 != mx.video.FLVPlayback.SEEKING) { this.dispatchEvent({'type': 'stateChange', 'state': v2, 'playheadTime': v3, 'vp': this._visibleVP}); } this.dispatchEvent({'type': 'scrubFinish', 'state': v2, 'playheadTime': v3}); }; v2.skinError = function (message) { if (this._firstStreamReady && !this._firstStreamShown) { this.showFirstStream(); } this.dispatchEvent({'type': 'skinError', 'message': message}); }; v2.skinLoaded = function () { if (this._firstStreamReady) { this._uiMgr.__set__visible(true); if (!this._firstStreamShown) { this.showFirstStream(); } } else { if (this._contentPath == undefined || this._contentPath == null || this._contentPath == '') { this._uiMgr.__set__visible(true); } } this.dispatchEvent({'type': 'skinLoaded'}); }; v1.version = '1.0.1.10'; v1.shortVersion = '1.0.1'; v1.DISCONNECTED = 'disconnected'; v1.STOPPED = 'stopped'; v1.PLAYING = 'playing'; v1.PAUSED = 'paused'; v1.BUFFERING = 'buffering'; v1.LOADING = 'loading'; v1.CONNECTION_ERROR = 'connectionError'; v1.REWINDING = 'rewinding'; v1.SEEKING = 'seeking'; v1.ALL = 'all'; v1.EVENT = 'event'; v1.NAVIGATION = 'navigation'; v1.FLV = 'flv'; v1.ACTIONSCRIPT = 'actionscript'; v1.VP_DEPTH_OFFSET = 100; v1.SEEK_TO_PREV_OFFSET_DEFAULT = 1; v2.addProperty('activeVideoPlayerIndex', v2.__get__activeVideoPlayerIndex, v2.__set__activeVideoPlayerIndex); v2.addProperty('autoPlay', v2.__get__autoPlay, v2.__set__autoPlay); v2.addProperty('autoRewind', v2.__get__autoRewind, v2.__set__autoRewind); v2.addProperty('autoSize', v2.__get__autoSize, v2.__set__autoSize); v2.addProperty('backButton', v2.__get__backButton, v2.__set__backButton); v2.addProperty('bitrate', v2.__get__bitrate, v2.__set__bitrate); v2.addProperty('bufferTime', v2.__get__bufferTime, v2.__set__bufferTime); v2.addProperty('buffering', v2.__get__buffering, function () {}); v2.addProperty('bufferingBar', v2.__get__bufferingBar, v2.__set__bufferingBar); v2.addProperty('bufferingBarHidesAndDisablesOthers', v2.__get__bufferingBarHidesAndDisablesOthers, v2.__set__bufferingBarHidesAndDisablesOthers); v2.addProperty('bytesLoaded', v2.__get__bytesLoaded, function () {}); v2.addProperty('bytesTotal', v2.__get__bytesTotal, function () {}); v2.addProperty('contentPath', v2.__get__contentPath, v2.__set__contentPath); v2.addProperty('cuePoints', function () {}, v2.__set__cuePoints); v2.addProperty('forwardButton', v2.__get__forwardButton, v2.__set__forwardButton); v2.addProperty('height', v2.__get__height, v2.__set__height); v2.addProperty('idleTimeout', v2.__get__idleTimeout, v2.__set__idleTimeout); v2.addProperty('isLive', v2.__get__isLive, v2.__set__isLive); v2.addProperty('isRTMP', v2.__get__isRTMP, function () {}); v2.addProperty('maintainAspectRatio', v2.__get__maintainAspectRatio, v2.__set__maintainAspectRatio); v2.addProperty('metadata', v2.__get__metadata, function () {}); v2.addProperty('metadataLoaded', v2.__get__metadataLoaded, function () {}); v2.addProperty('muteButton', v2.__get__muteButton, v2.__set__muteButton); v2.addProperty('ncMgr', v2.__get__ncMgr, function () {}); v2.addProperty('pauseButton', v2.__get__pauseButton, v2.__set__pauseButton); v2.addProperty('paused', v2.__get__paused, function () {}); v2.addProperty('playButton', v2.__get__playButton, v2.__set__playButton); v2.addProperty('playPauseButton', v2.__get__playPauseButton, v2.__set__playPauseButton); v2.addProperty('playheadPercentage', v2.__get__playheadPercentage, v2.__set__playheadPercentage); v2.addProperty('playheadTime', v2.__get__playheadTime, v2.__set__playheadTime); v2.addProperty('playheadUpdateInterval', v2.__get__playheadUpdateInterval, v2.__set__playheadUpdateInterval); v2.addProperty('playing', v2.__get__playing, function () {}); v2.addProperty('preferredHeight', v2.__get__preferredHeight, function () {}); v2.addProperty('preferredWidth', v2.__get__preferredWidth, function () {}); v2.addProperty('progressInterval', v2.__get__progressInterval, v2.__set__progressInterval); v2.addProperty('scaleX', v2.__get__scaleX, v2.__set__scaleX); v2.addProperty('scaleY', v2.__get__scaleY, v2.__set__scaleY); v2.addProperty('scrubbing', v2.__get__scrubbing, function () {}); v2.addProperty('seekBar', v2.__get__seekBar, v2.__set__seekBar); v2.addProperty('seekBarInterval', v2.__get__seekBarInterval, v2.__set__seekBarInterval); v2.addProperty('seekBarScrubTolerance', v2.__get__seekBarScrubTolerance, v2.__set__seekBarScrubTolerance); v2.addProperty('seekToPrevOffset', v2.__get__seekToPrevOffset, v2.__set__seekToPrevOffset); v2.addProperty('skin', v2.__get__skin, v2.__set__skin); v2.addProperty('skinAutoHide', v2.__get__skinAutoHide, v2.__set__skinAutoHide); v2.addProperty('state', v2.__get__state, function () {}); v2.addProperty('stateResponsive', v2.__get__stateResponsive, function () {}); v2.addProperty('stopButton', v2.__get__stopButton, v2.__set__stopButton); v2.addProperty('stopped', v2.__get__stopped, function () {}); v2.addProperty('totalTime', v2.__get__totalTime, v2.__set__totalTime); v2.addProperty('transform', v2.__get__transform, v2.__set__transform); v2.addProperty('version_1_0_1', v2.__get__version_1_0_1, v2.__set__version_1_0_1); v2.addProperty('visible', v2.__get__visible, v2.__set__visible); v2.addProperty('visibleVideoPlayerIndex', v2.__get__visibleVideoPlayerIndex, v2.__set__visibleVideoPlayerIndex); v2.addProperty('volume', v2.__get__volume, v2.__set__volume); v2.addProperty('volumeBar', v2.__get__volumeBar, v2.__set__volumeBar); v2.addProperty('volumeBarInterval', v2.__get__volumeBarInterval, v2.__set__volumeBarInterval); v2.addProperty('volumeBarScrubTolerance', v2.__get__volumeBarScrubTolerance, v2.__set__volumeBarScrubTolerance); v2.addProperty('width', v2.__get__width, v2.__set__width); v2.addProperty('x', v2.__get__x, v2.__set__x); v2.addProperty('y', v2.__get__y, v2.__set__y); ASSetPropFlags(mx.video.FLVPlayback.prototype, null, 1); } #endinitclip } movieClip 14 __Packages.mx.video.UIManager { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.UIManager) { var v1 = function (vc) { this._vc = vc; this._skin = undefined; this._skinAutoHide = false; this._skinReady = true; this.__visible = true; this._bufferingBarHides = false; this._controlsEnabled = true; this._lastScrubPos = 0; this._lastVolumePos = 0; this.cachedSoundLevel = this._vc.volume; this._isMuted = false; this.controls = new Array(); this.customClips = undefined; this.skin_mc = undefined; this.skinLoader = undefined; this.layout_mc = undefined; this.border_mc = undefined; this._seekBarIntervalID = 0; this._seekBarInterval = mx.video.UIManager.SEEK_BAR_INTERVAL_DEFAULT; this._seekBarScrubTolerance = mx.video.UIManager.SEEK_BAR_SCRUB_TOLERANCE_DEFAULT; this._volumeBarIntervalID = 0; this._volumeBarInterval = mx.video.UIManager.VOLUME_BAR_INTERVAL_DEFAULT; this._volumeBarScrubTolerance = mx.video.UIManager.VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT; this._bufferingDelayIntervalID = 0; this._bufferingDelayInterval = mx.video.UIManager.BUFFERING_DELAY_INTERVAL_DEFAULT; this._bufferingOn = false; this._skinAutoHideIntervalID = 0; this._vc.addEventListener('metadataReceived', this); this._vc.addEventListener('playheadUpdate', this); this._vc.addEventListener('progress', this); this._vc.addEventListener('stateChange', this); this._vc.addEventListener('ready', this); this._vc.addEventListener('resize', this); this._vc.addEventListener('volumeUpdate', this); }; mx.video.UIManager = v1; var v2 = v1.prototype; v2.handleEvent = function (e) { if (e.vp != undefined && e.vp != this._vc.__get__visibleVideoPlayerIndex()) { return undefined; } var v9 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); if (e.type == 'stateChange') { if (e.state == mx.video.FLVPlayback.BUFFERING) { if (!this._bufferingOn) { clearInterval(this._bufferingDelayIntervalID); this._bufferingDelayIntervalID = setInterval(this, 'doBufferingDelay', this._bufferingDelayInterval); } } else { clearInterval(this._bufferingDelayIntervalID); this._bufferingDelayIntervalID = 0; this._bufferingOn = false; } if (e.state == mx.video.FLVPlayback.LOADING) { this._progressPercent = (this._vc.getVideoPlayer(e.vp)).__get__isRTMP() ? 100 : 0; var v2 = mx.video.UIManager.SEEK_BAR; while (v2 <= mx.video.UIManager.VOLUME_BAR) { var v4 = this.controls[v2]; if (v4.progress_mc != undefined) { this.positionBar(v4, 'progress', this._progressPercent); } ++v2; } } v2 = 0; while (v2 < mx.video.UIManager.NUM_CONTROLS) { if (this.controls[v2] == undefined) { } else { this.setEnabledAndVisibleForState(v2, e.state); if (v2 < mx.video.UIManager.NUM_BUTTONS) { this.skinButtonControl(this.controls[v2]); } } ++v2; } } else { if (e.type == 'ready' || e.type == 'metadataReceived') { var v2 = 0; while (v2 < mx.video.UIManager.NUM_CONTROLS) { if (this.controls[v2] == undefined) { } else { this.setEnabledAndVisibleForState(v2, this._vc.__get__state()); if (v2 < mx.video.UIManager.NUM_BUTTONS) { this.skinButtonControl(this.controls[v2]); } } ++v2; } if ((this._vc.getVideoPlayer(e.vp)).__get__isRTMP()) { this._progressPercent = 100; v2 = mx.video.UIManager.SEEK_BAR; while (v2 <= mx.video.UIManager.VOLUME_BAR) { var v4 = this.controls[v2]; if (v4.progress_mc != undefined) { this.positionBar(v4, 'progress', this._progressPercent); } ++v2; } } } else { if (e.type == 'resize') { this.layoutSkin(); this.setupSkinAutoHide(); } else { if (e.type == 'volumeUpdate') { if (this._isMuted && e.volume > 0) { this._isMuted = false; this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING); this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_OFF_BUTTON]); this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING); this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_ON_BUTTON]); } var v5 = this.controls[mx.video.UIManager.VOLUME_BAR]; v5.percentage = this._isMuted ? this.cachedSoundLevel : e.volume; if (v5.percentage < 0) { v5.percentage = 0; } else { if (v5.percentage > 100) { v5.percentage = 100; } } this.positionHandle(mx.video.UIManager.VOLUME_BAR); } else { if (e.type == 'playheadUpdate' && this.controls[mx.video.UIManager.SEEK_BAR] != undefined) { if (!this._vc.__get__isLive() && this._vc.__get__totalTime() > 0) { var v6 = (e.playheadTime / this._vc.__get__totalTime()) * 100; if (v6 < 0) { v6 = 0; } else { if (v6 > 100) { v6 = 100; } } var v10 = this.controls[mx.video.UIManager.SEEK_BAR]; v10.percentage = v6; this.positionHandle(mx.video.UIManager.SEEK_BAR); } } else { if (e.type == 'progress') { this._progressPercent = e.bytesTotal <= 0 ? 100 : (e.bytesLoaded / e.bytesTotal) * 100; var v7 = this._vc._vpState[e.vp].minProgressPercent; if (!isNaN(v7) && v7 > this._progressPercent) { this._progressPercent = v7; } if (this._vc.__get__totalTime() > 0) { var v8 = (this._vc.__get__playheadTime() / this._vc.__get__totalTime()) * 100; if (v8 > this._progressPercent) { this._progressPercent = v8; this._vc._vpState[e.vp].minProgressPercent = this._progressPercent; } } var v2 = mx.video.UIManager.SEEK_BAR; while (v2 <= mx.video.UIManager.VOLUME_BAR) { var v4 = this.controls[v2]; if (v4.progress_mc != undefined) { this.positionBar(v4, 'progress', this._progressPercent); } ++v2; } } } } } } } this._vc.__set__activeVideoPlayerIndex(v9); }; v2.__get__bufferingBarHidesAndDisablesOthers = function () { return this._bufferingBarHides; }; v2.__set__bufferingBarHidesAndDisablesOthers = function (b) { this._bufferingBarHides = b; return this.__get__bufferingBarHidesAndDisablesOthers(); }; v2.__get__controlsEnabled = function () { return this._controlsEnabled; }; v2.__set__controlsEnabled = function (flag) { if (this._controlsEnabled == flag) { return undefined; } this._controlsEnabled = flag; var v2 = 0; while (v2 < mx.video.UIManager.NUM_BUTTONS) { if (this.controls[v2] == undefined) { } else { this.controls[v2].releaseCapture(); this.controls[v2].enabled = this._controlsEnabled && this.controls[v2].myEnabled; this.skinButtonControl(this.controls[v2]); } ++v2; } return this.__get__controlsEnabled(); }; v2.__get__skin = function () { return this._skin; }; v2.__set__skin = function (s) { if (s == this._skin) { return undefined; } if (this._skin != undefined) { this.removeSkin(); } this._skin = s; this._skinReady = this._skin == undefined || this._skin == null || this._skin == ''; if (!this._skinReady) { this.downloadSkin(); } return this.__get__skin(); }; v2.__get__skinAutoHide = function () { return this._skinAutoHide; }; v2.__set__skinAutoHide = function (b) { if (b == this._skinAutoHide) { return undefined; } this._skinAutoHide = b; this.setupSkinAutoHide(); return this.__get__skinAutoHide(); }; v2.__get__skinReady = function () { return this._skinReady; }; v2.__get__seekBarInterval = function () { return this._seekBarInterval; }; v2.__set__seekBarInterval = function (s) { if (this._seekBarInterval == s) { return undefined; } this._seekBarInterval = s; if (this._seekBarIntervalID > 0) { clearInterval(this._seekBarIntervalID); this._seekBarIntervalID = setInterval(this, 'seekBarListener', this._seekBarInterval, false); } return this.__get__seekBarInterval(); }; v2.__get__volumeBarInterval = function () { return this._volumeBarInterval; }; v2.__set__volumeBarInterval = function (s) { if (this._volumeBarInterval == s) { return undefined; } this._volumeBarInterval = s; if (this._volumeBarIntervalID > 0) { clearInterval(this._volumeBarIntervalID); this._volumeBarIntervalID = setInterval(this, 'volumeBarListener', this._volumeBarInterval, false); } return this.__get__volumeBarInterval(); }; v2.__get__bufferingDelayInterval = function () { return this._bufferingDelayInterval; }; v2.__set__bufferingDelayInterval = function (s) { if (this._bufferingDelayInterval == s) { return undefined; } this._bufferingDelayInterval = s; if (this._bufferingDelayIntervalID > 0) { clearInterval(this._bufferingDelayIntervalID); this._bufferingDelayIntervalID = setInterval(this, 'doBufferingDelay', this._bufferingDelayIntervalID); } return this.__get__bufferingDelayInterval(); }; v2.__get__volumeBarScrubTolerance = function () { return this._volumeBarScrubTolerance; }; v2.__set__volumeBarScrubTolerance = function (s) { this._volumeBarScrubTolerance = s; return this.__get__volumeBarScrubTolerance(); }; v2.__get__seekBarScrubTolerance = function () { return this._seekBarScrubTolerance; }; v2.__set__seekBarScrubTolerance = function (s) { this._seekBarScrubTolerance = s; return this.__get__seekBarScrubTolerance(); }; v2.__get__visible = function () { return this.__visible; }; v2.__set__visible = function (v) { if (this.__visible == v) { return undefined; } this.__visible = v; if (!this.__visible) { this.skin_mc._visible = false; } else { this.setupSkinAutoHide(); } return this.__get__visible(); }; v2.getControl = function (index) { return this.controls[index]; }; v2.setControl = function (index, s) { if (s == null) { s = undefined; } if (s == this.controls[index]) { return undefined; } switch (index) { case mx.video.UIManager.PAUSE_BUTTON: case mx.video.UIManager.PLAY_BUTTON: this.resetPlayPause(); break; case mx.video.UIManager.PLAY_PAUSE_BUTTON: if (s._parent != this.layout_mc) { this.resetPlayPause(); this.setControl(mx.video.UIManager.PAUSE_BUTTON, s.pause_mc); this.setControl(mx.video.UIManager.PLAY_BUTTON, s.play_mc); } break; case mx.video.UIManager.MUTE_BUTTON: if (s._parent != this.layout_mc) { this.setControl(mx.video.UIManager.MUTE_ON_BUTTON, s.on_mc); this.setControl(mx.video.UIManager.MUTE_OFF_BUTTON, s.off_mc); } } if (index >= mx.video.UIManager.NUM_BUTTONS) { this.controls[index] = s; switch (index) { case mx.video.UIManager.SEEK_BAR: this.addBarControl(mx.video.UIManager.SEEK_BAR); break; case mx.video.UIManager.VOLUME_BAR: this.addBarControl(mx.video.UIManager.VOLUME_BAR); this.controls[mx.video.UIManager.VOLUME_BAR].percentage = this._vc.volume; break; case mx.video.UIManager.BUFFERING_BAR: this.controls[mx.video.UIManager.BUFFERING_BAR].uiMgr = this; this.controls[mx.video.UIManager.BUFFERING_BAR].controlIndex = mx.video.UIManager.BUFFERING_BAR; if (this.controls[mx.video.UIManager.BUFFERING_BAR]._parent == this.skin_mc) { this.finishAddBufferingBar(); } else { this.controls[mx.video.UIManager.BUFFERING_BAR].onEnterFrame = function () { this.uiMgr.finishAddBufferingBar(); }; } } this.setEnabledAndVisibleForState(index, this._vc.__get__state()); } else { this.removeButtonControl(index); this.controls[index] = s; this.addButtonControl(index); } }; v2.resetPlayPause = function () { if (this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] == undefined) { return undefined; } var v2 = mx.video.UIManager.PAUSE_BUTTON; while (v2 <= mx.video.UIManager.PLAY_BUTTON) { this.removeButtonControl(v2); ++v2; } this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] = undefined; }; v2.addButtonControl = function (index) { var v3 = this.controls[index]; if (v3 == undefined) { return undefined; } var v5 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); v3.id = index; v3.state = mx.video.UIManager.UP_STATE; v3.uiMgr = this; this.setEnabledAndVisibleForState(index, this._vc.__get__state()); v3.onRollOver = function () { this.state = mx.video.UIManager.OVER_STATE; this.uiMgr.skinButtonControl(this); }; v3.onRollOut = function () { this.state = mx.video.UIManager.UP_STATE; this.uiMgr.skinButtonControl(this); }; if (index == mx.video.UIManager.SEEK_BAR_HANDLE || index == mx.video.UIManager.VOLUME_BAR_HANDLE) { v3.onPress = function () { if (_root.focusManager) { this._focusrect = false; Selection.setFocus(this); } this.state = mx.video.UIManager.DOWN_STATE; this.uiMgr.dispatchMessage(this); this.uiMgr.skinButtonControl(this); }; v3.onRelease = function () { this.state = mx.video.UIManager.OVER_STATE; this.uiMgr.handleRelease(this.controlIndex); this.uiMgr.skinButtonControl(this); }; v3.onReleaseOutside = function () { this.state = mx.video.UIManager.UP_STATE; this.uiMgr.handleRelease(this.controlIndex); this.uiMgr.skinButtonControl(this); }; } else { v3.onPress = function () { if (_root.focusManager) { this._focusrect = false; Selection.setFocus(this); } this.state = mx.video.UIManager.DOWN_STATE; this.uiMgr.skinButtonControl(this); }; v3.onRelease = function () { this.state = mx.video.UIManager.OVER_STATE; this.uiMgr.dispatchMessage(this); this.uiMgr.skinButtonControl(this); }; v3.onReleaseOutside = function () { this.state = mx.video.UIManager.UP_STATE; this.uiMgr.skinButtonControl(this); }; } if (v3._parent == this.skin_mc) { this.skinButtonControl(v3); } else { v3.onEnterFrame = function () { this.uiMgr.skinButtonControl(this); }; } this._vc.__set__activeVideoPlayerIndex(v5); }; v2.removeButtonControl = function (index) { if (this.controls[index] == undefined) { return undefined; } this.controls[index].uiMgr = undefined; this.controls[index].onRollOver = undefined; this.controls[index].onRollOut = undefined; this.controls[index].onPress = undefined; this.controls[index].onRelease = undefined; this.controls[index].onReleaseOutside = undefined; this.controls[index] = undefined; }; v2.downloadSkin = function () { if (this.skinLoader == undefined) { this.skinLoader = new MovieClipLoader(); this.skinLoader.addListener(this); } if (this.skin_mc == undefined) { this.skin_mc = this._vc.createEmptyMovieClip('skin_mc', this._vc.getNextHighestDepth()); } this.skin_mc._visible = false; this.skin_mc._x = Stage.width + 100; this.skin_mc._y = Stage.height + 100; this.skinLoader.loadClip(this._skin, this.skin_mc); }; v2.onLoadError = function (target_mc, errorCode) { this._skinReady = true; this._vc.skinError('Unable to load skin swf'); }; v2.onLoadInit = function () { try { this.skin_mc._visible = false; this.skin_mc._x = 0; this.skin_mc._y = 0; this.layout_mc = this.skin_mc.layout_mc; if (this.layout_mc == undefined) { throw new Error('No layout_mc'); } this.layout_mc._visible = false; this.customClips = new Array(); this.setCustomClips('bg'); if (this.layout_mc.playpause_mc != undefined) { this.setSkin(mx.video.UIManager.PLAY_PAUSE_BUTTON, this.layout_mc.playpause_mc); } else { this.setSkin(mx.video.UIManager.PAUSE_BUTTON, this.layout_mc.pause_mc); this.setSkin(mx.video.UIManager.PLAY_BUTTON, this.layout_mc.play_mc); } this.setSkin(mx.video.UIManager.STOP_BUTTON, this.layout_mc.stop_mc); this.setSkin(mx.video.UIManager.BACK_BUTTON, this.layout_mc.back_mc); this.setSkin(mx.video.UIManager.FORWARD_BUTTON, this.layout_mc.forward_mc); this.setSkin(mx.video.UIManager.MUTE_BUTTON, this.layout_mc.volumeMute_mc); this.setSkin(mx.video.UIManager.SEEK_BAR, this.layout_mc.seekBar_mc); this.setSkin(mx.video.UIManager.VOLUME_BAR, this.layout_mc.volumeBar_mc); this.setSkin(mx.video.UIManager.BUFFERING_BAR, this.layout_mc.bufferingBar_mc); this.setCustomClips('fg'); this.layoutSkin(); this.setupSkinAutoHide(); this.skin_mc._visible = this.__visible; this._skinReady = true; this._vc.skinLoaded(); var v4 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); var v3 = this._vc.__get__state(); var v2 = 0; while (v2 < mx.video.UIManager.NUM_CONTROLS) { if (this.controls[v2] == undefined) { } else { this.setEnabledAndVisibleForState(v2, v3); if (v2 < mx.video.UIManager.NUM_BUTTONS) { this.skinButtonControl(this.controls[v2]); } } ++v2; } this._vc.__set__activeVideoPlayerIndex(v4); } catch (v0) { if (Error(v0) != null) { var err = Error(v0); this._vc.skinError(err.message); this.removeSkin(); } else { throw v0; } } }; v2.layoutSkin = function () { if (this.layout_mc == undefined) { return undefined; } var v3 = this.layout_mc.video_mc; if (v3 == undefined) { throw new Error('No layout_mc.video_mc'); } this.placeholderLeft = v3._x; this.placeholderRight = v3._x + v3._width; this.placeholderTop = v3._y; this.placeholderBottom = v3._y + v3._height; this.videoLeft = 0; this.videoRight = this._vc.width; this.videoTop = 0; this.videoBottom = this._vc.height; if (!isNaN(this.layout_mc.minWidth) && this.layout_mc.minWidth > 0 && this.layout_mc.minWidth > this.videoRight) { this.videoLeft -= (this.layout_mc.minWidth - this.videoRight) / 2; this.videoRight = this.layout_mc.minWidth + this.videoLeft; } if (!isNaN(this.layout_mc.minHeight) && this.layout_mc.minHeight > 0 && this.layout_mc.minHeight > this.videoBottom) { this.videoTop -= (this.layout_mc.minHeight - this.videoBottom) / 2; this.videoBottom = this.layout_mc.minHeight + this.videoTop; } var v2; v2 = 0; while (v2 < this.customClips.length) { this.layoutControl(this.customClips[v2]); ++v2; } v2 = 0; while (v2 < mx.video.UIManager.NUM_CONTROLS) { this.layoutControl(this.controls[v2]); ++v2; } }; v2.layoutControl = function (ctrl) { if (ctrl == undefined) { return undefined; } if (ctrl.skin.anchorRight) { if (ctrl.skin.anchorLeft) { ctrl._x = ctrl.skin._x - this.placeholderLeft + this.videoLeft; ctrl._width = ctrl.skin._x + ctrl.skin._width - this.placeholderRight + this.videoRight - ctrl._x; if (ctrl.origWidth != undefined) { ctrl.origWidth = undefined; } } else { ctrl._x = ctrl.skin._x - this.placeholderRight + this.videoRight; } } else { ctrl._x = ctrl.skin._x - this.placeholderLeft + this.videoLeft; } if (ctrl.skin.anchorTop) { if (ctrl.skin.anchorBottom) { ctrl._y = ctrl.skin._y - this.placeholderTop + this.videoTop; ctrl._height = ctrl.skin._y + ctrl.skin._height - this.placeholderBottom + this.videoBottom - ctrl._y; if (ctrl.origHeight != undefined) { ctrl.origHeight = undefined; } } else { ctrl._y = ctrl.skin._y - this.placeholderTop + this.videoTop; } } else { ctrl._y = ctrl.skin._y - this.placeholderBottom + this.videoBottom; } switch (ctrl.controlIndex) { case mx.video.UIManager.SEEK_BAR: case mx.video.UIManager.VOLUME_BAR: if (ctrl.progress_mc != undefined) { if (this._progressPercent == undefined) { this._progressPercent = this._vc.__get__isRTMP() ? 100 : 0; } this.positionBar(ctrl, 'progress', this._progressPercent); } this.positionHandle(ctrl.controlIndex); break; case mx.video.UIManager.BUFFERING_BAR: if (ctrl.fill_mc != undefined) { this.positionMaskedFill(ctrl, ctrl.fill_mc, 100); } } if (ctrl.layoutSelf != undefined) { ctrl.layoutSelf(); } }; v2.removeSkin = function () { if (this.skin_mc != undefined) { var v2 = 0; while (v2 < mx.video.UIManager.NUM_BUTTONS) { this.removeButtonControl(v2); ++v2; } v2 = mx.video.UIManager.NUM_BUTTONS; while (v2 < mx.video.UIManager.NUM_CONTROLS) { this.controls[v2] = undefined; ++v2; } this.skin_mc.unloadMovie(); this.layout_mc = undefined; this.border_mc = undefined; } }; v2.setCustomClips = function (prefix) { var v4 = 1; while (!false) { var v2 = this.layout_mc[prefix + v4++ + '_mc']; if (v2 == undefined) { break; } var v3 = v2.mc; if (v3 == undefined) { v3 = v2._parent._parent[v2._name]; } if (v3 == undefined) { throw new Error('Bad clip in skin: ' + v2); } v3.skin = v2; this.customClips.push(v3); if (prefix == 'bg' && v4 == 2) { this.border_mc = v3; } } }; v2.setSkin = function (index, s) { if (s == undefined) { return undefined; } var v2 = s.mc; if (v2 == undefined) { v2 = s._parent._parent[s._name]; } if (v2 == undefined) { throw new Error('Bad clip in skin: ' + s); } v2.skin = s; if (index < mx.video.UIManager.NUM_BUTTONS) { this.setupSkinStates(v2); } else { switch (index) { case mx.video.UIManager.PLAY_PAUSE_BUTTON: this.setupSkinStates(v2.play_mc); this.setupSkinStates(v2.pause_mc); break; case mx.video.UIManager.MUTE_BUTTON: this.setupSkinStates(v2.on_mc); this.setupSkinStates(v2.off_mc); break; case mx.video.UIManager.SEEK_BAR: case mx.video.UIManager.VOLUME_BAR: var v4 = (index == mx.video.UIManager.SEEK_BAR) ? 'seekBar' : 'volumeBar'; if (v2.handle_mc == undefined) { v2.handle_mc = v2.skin.seekBarHandle_mc; if (v2.handle_mc == undefined) { v2.handle_mc = v2.skin._parent._parent[v4 + 'Handle_mc']; } } if (v2.progress_mc == undefined) { v2.progress_mc = v2.skin.progress_mc; if (v2.progress_mc == undefined) { v2.progress_mc = v2.skin._parent._parent[v4 + 'Progress_mc']; } } if (v2.fullness_mc == undefined) { v2.fullness_mc = v2.skin.fullness_mc; if (v2.fullness_mc == undefined) { v2.fullness_mc = v2.skin._parent._parent[v4 + 'Fullness_mc']; } } break; case mx.video.UIManager.BUFFERING_BAR: if (v2.fill_mc == undefined) { v2.fill_mc = v2.skin.fill_mc; if (v2.fill_mc == undefined) { v2.fill_mc = v2.skin._parent._parent.bufferingBarFill_mc; } } } } this.setControl(index, v2); }; v2.setupSkinStates = function (ctrl) { if (ctrl.up_mc == undefined) { ctrl.up_mc = ctrl; ctrl.over_mc = ctrl; ctrl.down_mc = ctrl; ctrl.disabled_mc = ctrl; } else { ctrl._x = 0; ctrl._y = 0; ctrl.up_mc._x = 0; ctrl.up_mc._y = 0; ctrl.up_mc._visible = true; if (ctrl.over_mc == undefined) { ctrl.over_mc = ctrl.up_mc; } else { ctrl.over_mc._x = 0; ctrl.over_mc._y = 0; ctrl.over_mc._visible = false; } if (ctrl.down_mc == undefined) { ctrl.down_mc = ctrl.up_mc; } else { ctrl.down_mc._x = 0; ctrl.down_mc._y = 0; ctrl.down_mc._visible = false; } if (ctrl.disabled_mc == undefined) { ctrl.disabled_mc_mc = ctrl.up_mc; } else { ctrl.disabled_mc._x = 0; ctrl.disabled_mc._y = 0; ctrl.disabled_mc._visible = false; } } }; v2.skinButtonControl = function (ctrl) { if (ctrl.onEnterFrame != undefined) { delete ctrl.onEnterFrame; ctrl.onEnterFrame = undefined; } if (ctrl.enabled) { switch (ctrl.state) { case mx.video.UIManager.UP_STATE: if (ctrl.up_mc == undefined) { ctrl.up_mc = ctrl.attachMovie(ctrl.upLinkageID, 'up_mc', ctrl.getNextHighestDepth()); } this.applySkinState(ctrl, ctrl.up_mc); break; case mx.video.UIManager.OVER_STATE: if (ctrl.over_mc == undefined) { if (ctrl.overLinkageID == undefined) { ctrl.over_mc = ctrl.up_mc; } else { ctrl.over_mc = ctrl.attachMovie(ctrl.overLinkageID, 'over_mc', ctrl.getNextHighestDepth()); } } this.applySkinState(ctrl, ctrl.over_mc); break; case mx.video.UIManager.DOWN_STATE: if (ctrl.down_mc == undefined) { if (ctrl.downLinkageID == undefined) { ctrl.down_mc = ctrl.up_mc; } else { ctrl.down_mc = ctrl.attachMovie(ctrl.downLinkageID, 'down_mc', ctrl.getNextHighestDepth()); } } this.applySkinState(ctrl, ctrl.down_mc); } } else { ctrl.state = mx.video.UIManager.UP_STATE; if (ctrl.disabled_mc == undefined) { if (ctrl.disabledLinkageID == undefined) { ctrl.disabled_mc = ctrl.up_mc; } else { ctrl.disabled_mc = ctrl.attachMovie(ctrl.disabledLinkageID, 'disabled_mc', ctrl.getNextHighestDepth()); } } this.applySkinState(ctrl, ctrl.disabled_mc); } if (ctrl.placeholder_mc != undefined) { ctrl.placeholder_mc.unloadMovie(); delete ctrl.placeholder_mc; ctrl.placeholder_mc = undefined; } }; v2.applySkinState = function (ctrl, state) { if (state != ctrl.currentState_mc) { if (state != undefined) { state._visible = true; } if (ctrl.currentState_mc != undefined) { ctrl.currentState_mc._visible = false; } ctrl.currentState_mc = state; } }; v2.addBarControl = function (controlIndex) { var v2 = this.controls[controlIndex]; v2.isDragging = false; v2.percentage = 0; v2.uiMgr = this; v2.controlIndex = controlIndex; if (v2._parent == this.skin_mc) { this.finishAddBarControl(controlIndex); } else { v2.onEnterFrame = function () { this.uiMgr.finishAddBarControl(this.controlIndex); }; } }; v2.finishAddBarControl = function (controlIndex) { var v2 = this.controls[controlIndex]; delete v2.onEnterFrame; v2.onEnterFrame = undefined; if (v2.addBarControl != undefined) { v2.addBarControl(); } this.calcBarMargins(v2, 'handle', true); this.calcBarMargins(v2, 'progress', false); this.calcBarMargins(v2.progress_mc, 'fill', false); this.calcBarMargins(v2.progress_mc, 'mask', false); this.calcBarMargins(v2, 'fullness', false); this.calcBarMargins(v2.fullness_mc, 'fill', false); this.calcBarMargins(v2.fullness_mc, 'mask', false); v2.origWidth = v2._width; v2.origHeight = v2._height; this.fixUpBar(v2, 'progress'); if (v2.progress_mc != undefined) { this.fixUpBar(v2, 'progressBarFill'); if (this._progressPercent == undefined) { this._progressPercent = this._vc.__get__isRTMP() ? 100 : 0; } this.positionBar(v2, 'progress', this._progressPercent); } this.fixUpBar(v2, 'fullness'); if (v2.fullness_mc != undefined) { this.fixUpBar(v2, 'fullnessBarFill'); } this.fixUpBar(v2, 'handle'); v2.handle_mc.controlIndex = controlIndex; switch (controlIndex) { case mx.video.UIManager.SEEK_BAR: this.setControl(mx.video.UIManager.SEEK_BAR_HANDLE, v2.handle_mc); break; case mx.video.UIManager.VOLUME_BAR: this.setControl(mx.video.UIManager.VOLUME_BAR_HANDLE, v2.handle_mc); } this.positionHandle(controlIndex); }; v2.fixUpBar = function (ctrl, type) { if (ctrl[type + 'LinkageID'] != undefined && ctrl[type + 'LinkageID'].length > 0) { var v1; if (ctrl[type + 'Below']) { v1 = -1; while (ctrl._parent.getInstanceAtDepth(v1) != undefined) { --v1; } } else { ctrl[type + 'Below'] = false; v1 = ctrl._parent.getNextHighestDepth(); } var v5 = (ctrl.controlIndex == mx.video.UIManager.SEEK_BAR) ? 'seekBar' : 'volumeBar'; var v4 = v5 + (type.substring(0, 1)).toUpperCase() + type.substring(1) + '_mc'; ctrl[type + '_mc'] = ctrl._parent.attachMovie(ctrl[type + 'LinkageID'], v4, v1); } }; v2.calcBarMargins = function (ctrl, type, symmetricMargins) { var v2 = ctrl[type + '_mc']; if (v2 == undefined) { return undefined; } if (ctrl[type + 'LeftMargin'] == undefined && v2._parent == ctrl._parent) { ctrl[type + 'LeftMargin'] = v2._x - ctrl._x; } if (ctrl[type + 'RightMargin'] == undefined) { if (symmetricMargins) { ctrl[type + 'RightMargin'] = ctrl[type + 'LeftMargin']; } else { if (v2._parent == ctrl._parent) { ctrl[type + 'RightMargin'] = ctrl._width - v2._width - v2._x + ctrl._x; } } } if (ctrl[type + 'TopMargin'] == undefined && v2._parent == ctrl._parent) { ctrl[type + 'TopMargin'] = v2._y - ctrl._y; } if (ctrl[type + 'BottomMargin'] == undefined) { if (symmetricMargins) { ctrl[type + 'BottomMargin'] = ctrl[type + 'TopMargin']; } else { if (v2._parent == ctrl._parent) { ctrl[type + 'BottomMargin'] = ctrl._height - v2._height - v2._y + ctrl._y; } } } if (ctrl[type + 'X'] == undefined) { if (v2._parent == ctrl._parent) { ctrl[type + 'X'] = v2._x - ctrl._x; } else { if (v2._parent == ctrl) { ctrl[type + 'X'] = v2._x; } } } if (ctrl[type + 'Y'] == undefined) { if (v2._parent == ctrl._parent) { ctrl[type + 'Y'] = v2._y - ctrl._y; } else { if (v2._parent == ctrl) { ctrl[type + 'Y'] = v2._y; } } } ctrl[type + 'XScale'] = v2._xscale; ctrl[type + 'YScale'] = v2._yscale; ctrl[type + 'Width'] = v2._width; ctrl[type + 'Height'] = v2._height; }; v2.finishAddBufferingBar = function () { var v2 = this.controls[mx.video.UIManager.BUFFERING_BAR]; delete v2.onEnterFrame; v2.onEnterFrame = undefined; this.calcBarMargins(v2, 'fill', true); this.fixUpBar(v2, 'fill'); if (v2.fill_mc != undefined) { this.positionMaskedFill(v2, v2.fill_mc, 100); } }; v2.positionMaskedFill = function (ctrl, fill, percent) { var v5 = fill._parent; var v3 = ctrl.mask_mc; if (v3 == undefined) { v3 = v5.createEmptyMovieClip(ctrl._name + 'Mask_mc', v5.getNextHighestDepth()); ctrl.mask_mc = v3; v3.beginFill(16777215); v3.lineTo(0, 0); v3.lineTo(1, 0); v3.lineTo(1, 1); v3.lineTo(0, 1); v3.lineTo(0, 0); v3.endFill(); fill.setMask(v3); v3._x = ctrl.fillX; v3._y = ctrl.fillY; v3._width = ctrl.fillWidth; v3._height = ctrl.fillHeight; v3._visible = false; this.calcBarMargins(ctrl, 'mask', true); } if (v5 == ctrl) { if (fill.slideReveal) { fill._x = ctrl.maskX - ctrl.fillWidth + ctrl.fillWidth * percent / 100; } else { v3._width = ctrl.fillWidth * percent / 100; } } else { if (v5 == ctrl._parent) { if (fill.slideReveal) { v3._x = ctrl._x + ctrl.maskLeftMargin; v3._y = ctrl._y + ctrl.maskTopMargin; v3._width = ctrl._width - ctrl.maskRightMargin - ctrl.maskLeftMargin; v3._height = ctrl._height - ctrl.maskTopMargin - ctrl.maskBottomMargin; fill._x = v3._x - ctrl.fillWidth + ctrl.maskWidth * percent / 100; fill._y = ctrl._y + ctrl.fillTopMargin; } else { fill._x = ctrl._x + ctrl.fillLeftMargin; fill._y = ctrl._y + ctrl.fillTopMargin; v3._x = fill._x; v3._y = fill._y; v3._width = (ctrl._width - ctrl.fillRightMargin - ctrl.fillLeftMargin) * percent / 100; v3._height = ctrl._height - ctrl.fillTopMargin - ctrl.fillBottomMargin; } } } }; v2.startHandleDrag = function (controlIndex) { var v2 = this.controls[controlIndex]; var v5 = v2.handle_mc; if (v2.startHandleDrag == undefined || !v2.startHandleDrag()) { var v3 = v2._y + v2.handleY; var v4 = (v2.origWidth == undefined) ? v2._width : v2.origWidth; v5.startDrag(false, v2._x + v2.handleLeftMargin, v3, v2._x + v4 - v2.handleRightMargin, v3); } v2.isDragging = true; }; v2.stopHandleDrag = function (controlIndex) { var v2 = this.controls[controlIndex]; var v3 = v2.handle_mc; if (v2.stopHandleDrag == undefined || !v2.stopHandleDrag()) { v3.stopDrag(); } v2.isDragging = false; }; v2.positionHandle = function (controlIndex) { var v2 = this.controls[controlIndex]; var v3 = v2.handle_mc; if (v3 == undefined) { return undefined; } if (v2.positionHandle != undefined && v2.positionHandle()) { return undefined; } var v4 = (v2.origWidth == undefined) ? v2._width : v2.origWidth; var v5 = v4 - v2.handleRightMargin - v2.handleLeftMargin; v3._x = v2._x + v2.handleLeftMargin + v5 * v2.percentage / 100; v3._y = v2._y + v2.handleY; if (v2.fullness_mc != undefined) { this.positionBar(v2, 'fullness', v2.percentage); } }; v2.positionBar = function (ctrl, type, percent) { if (ctrl.positionBar != undefined && ctrl.positionBar(type, percent)) { return undefined; } var v2 = ctrl[type + '_mc']; if (v2._parent == ctrl) { if (v2.fill_mc == undefined) { v2._xscale = ctrl[type + 'XScale'] * percent / 100; } else { this.positionMaskedFill(v2, v2.fill_mc, percent); } } else { v2._x = ctrl._x + ctrl[type + 'LeftMargin']; v2._y = ctrl._y + ctrl[type + 'Y']; if (v2.fill_mc == undefined) { v2._width = (ctrl._width - ctrl[type + 'LeftMargin'] - ctrl[type + 'RightMargin']) * percent / 100; } else { this.positionMaskedFill(v2, v2.fill_mc, percent); } } }; v2.calcPercentageFromHandle = function (controlIndex) { var v2 = this.controls[controlIndex]; var v5 = v2.handle_mc; if (v2.calcPercentageFromHandle == undefined || !v2.calcPercentageFromHandle()) { var v3 = (v2.origWidth == undefined) ? v2._width : v2.origWidth; var v6 = v3 - v2.handleRightMargin - v2.handleLeftMargin; var v4 = v5._x - (v2._x + v2.handleLeftMargin); v2.percentage = (v4 / v6) * 100; if (v2.fullness_mc != undefined) { this.positionBar(v2, 'fullness', v2.percentage); } } if (v2.percentage < 0) { v2.percentage = 0; } if (v2.percentage > 100) { v2.percentage = 100; } }; v2.handleRelease = function (controlIndex) { var v3 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); if (controlIndex == mx.video.UIManager.SEEK_BAR) { this.seekBarListener(true); } else { if (controlIndex == mx.video.UIManager.VOLUME_BAR) { this.volumeBarListener(true); } } this.stopHandleDrag(controlIndex); this._vc.__set__activeVideoPlayerIndex(v3); if (controlIndex == mx.video.UIManager.SEEK_BAR) { this._vc._scrubFinish(); } }; v2.seekBarListener = function (finish) { var v3 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); var v4 = this.controls[mx.video.UIManager.SEEK_BAR]; this.calcPercentageFromHandle(mx.video.UIManager.SEEK_BAR); var v2 = v4.percentage; if (finish) { clearInterval(this._seekBarIntervalID); this._seekBarIntervalID = 0; if (v2 != this._lastScrubPos) { this._vc.seekPercent(v2); } this._vc.addEventListener('playheadUpdate', this); if (this._playAfterScrub) { this._vc.play(); } } else { if ((this._vc.getVideoPlayer(this._vc.__get__visibleVideoPlayerIndex())).__get__state() == mx.video.VideoPlayer.SEEKING) { } else { if (this._seekBarScrubTolerance <= 0 || Math.abs(v2 - this._lastScrubPos) > this._seekBarScrubTolerance || v2 < this._seekBarScrubTolerance || v2 > 100 - this._seekBarScrubTolerance) { if (v2 != this._lastScrubPos) { this._lastScrubPos = v2; this._vc.seekPercent(v2); } } } } this._vc.__set__activeVideoPlayerIndex(v3); }; v2.volumeBarListener = function (finish) { var v3 = this.controls[mx.video.UIManager.VOLUME_BAR]; this.calcPercentageFromHandle(mx.video.UIManager.VOLUME_BAR); var v2 = v3.percentage; if (finish) { clearInterval(this._volumeBarIntervalID); this._volumeBarIntervalID = 0; this._vc.addEventListener('volumeUpdate', this); } if (finish || this._volumeBarScrubTolerance <= 0 || Math.abs(v2 - this._lastVolumePos) > this._volumeBarScrubTolerance || v2 < this._volumeBarScrubTolerance || v2 > 100 - this._volumeBarScrubTolerance) { if (v2 != this._lastVolumePos) { if (this._isMuted) { this.cachedSoundLevel = v2; } else { this._vc.__set__volume(v2); } } } }; v2.doBufferingDelay = function () { clearInterval(this._bufferingDelayIntervalID); this._bufferingDelayIntervalID = 0; var v2 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); if (this._vc.__get__state() == mx.video.FLVPlayback.BUFFERING) { this._bufferingOn = true; this.handleEvent({'type': 'stateChange', 'state': mx.video.FLVPlayback.BUFFERING, 'vp': this._vc.__get__visibleVideoPlayerIndex()}); } this._vc.__set__activeVideoPlayerIndex(v2); }; v2.dispatchMessage = function (ctrl) { if (ctrl.id == mx.video.UIManager.SEEK_BAR_HANDLE) { this._vc._scrubStart(); } var v2 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); switch (ctrl.id) { case mx.video.UIManager.PAUSE_BUTTON: this._vc.pause(); break; case mx.video.UIManager.PLAY_BUTTON: this._vc.play(); break; case mx.video.UIManager.STOP_BUTTON: this._vc.stop(); break; case mx.video.UIManager.SEEK_BAR_HANDLE: this.calcPercentageFromHandle(mx.video.UIManager.SEEK_BAR); this._lastScrubPos = this.controls[mx.video.UIManager.SEEK_BAR].percentage; this._vc.removeEventListener('playheadUpdate', this); if (this._vc.__get__playing() || this._vc.__get__buffering()) { this._playAfterScrub = true; } else { if (this._vc.__get__state() != mx.video.VideoPlayer.SEEKING) { this._playAfterScrub = false; } } this._seekBarIntervalID = setInterval(this, 'seekBarListener', this._seekBarInterval, false); this.startHandleDrag(mx.video.UIManager.SEEK_BAR, mx.video.UIManager.SEEK_BAR_HANDLE); this._vc.pause(); break; case mx.video.UIManager.VOLUME_BAR_HANDLE: this.calcPercentageFromHandle(mx.video.UIManager.VOLUME_BAR); this._lastVolumePos = this.controls[mx.video.UIManager.VOLUME_BAR].percentage; this._vc.removeEventListener('volumeUpdate', this); this._volumeBarIntervalID = setInterval(this, 'volumeBarListener', this._volumeBarInterval, false); this.startHandleDrag(mx.video.UIManager.VOLUME_BAR, mx.video.UIManager.VOLUME_BAR_HANDLE); break; case mx.video.UIManager.BACK_BUTTON: this._vc.seekToPrevNavCuePoint(); break; case mx.video.UIManager.FORWARD_BUTTON: this._vc.seekToNextNavCuePoint(); break; case mx.video.UIManager.MUTE_ON_BUTTON: case mx.video.UIManager.MUTE_OFF_BUTTON: if (!this._isMuted) { this._isMuted = true; this.cachedSoundLevel = this._vc.volume; this._vc.__set__volume(0); } else { this._isMuted = false; this._vc.__set__volume(this.cachedSoundLevel); } this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING); this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_OFF_BUTTON]); this.setEnabledAndVisibleForState(mx.video.UIManager.MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING); this.skinButtonControl(this.controls[mx.video.UIManager.MUTE_ON_BUTTON]); break; default: throw new Error('Unknown ButtonControl'); } this._vc.__set__activeVideoPlayerIndex(v2); }; v2.setEnabledAndVisibleForState = function (index, state) { var v5 = this._vc.__get__activeVideoPlayerIndex(); this._vc.__set__activeVideoPlayerIndex(this._vc.visibleVideoPlayerIndex); var v3 = state; if (v3 == mx.video.FLVPlayback.BUFFERING && !this._bufferingOn) { v3 = mx.video.FLVPlayback.PLAYING; } switch (index) { case mx.video.UIManager.VOLUME_BAR: case mx.video.UIManager.VOLUME_BAR_HANDLE: this.controls[index].myEnabled = true; this.controls[index].enabled = this._controlsEnabled; break; case mx.video.UIManager.MUTE_ON_BUTTON: this.controls[index].myEnabled = !this._isMuted; if (this.controls[mx.video.UIManager.MUTE_BUTTON] != undefined) { this.controls[index]._visible = this.controls[index].myEnabled; } break; case mx.video.UIManager.MUTE_OFF_BUTTON: this.controls[index].myEnabled = this._isMuted; if (this.controls[mx.video.UIManager.MUTE_BUTTON] != undefined) { this.controls[index]._visible = this.controls[index].myEnabled; } break; default: switch (v3) { case mx.video.FLVPlayback.LOADING: case mx.video.FLVPlayback.CONNECTION_ERROR: this.controls[index].myEnabled = false; break; case mx.video.FLVPlayback.DISCONNECTED: this.controls[index].myEnabled = this._vc.__get__contentPath() != undefined; break; break; case mx.video.FLVPlayback.SEEKING: default: this.controls[index].myEnabled = true; } } switch (index) { case mx.video.UIManager.SEEK_BAR: switch (v3) { case mx.video.FLVPlayback.STOPPED: case mx.video.FLVPlayback.PLAYING: case mx.video.FLVPlayback.PAUSED: case mx.video.FLVPlayback.REWINDING: case mx.video.FLVPlayback.SEEKING: this.controls[index].myEnabled = true; break; case mx.video.FLVPlayback.BUFFERING: this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined; break; default: this.controls[index].myEnabled = false; } if (this.controls[index].myEnabled) { this.controls[index].myEnabled = !isNaN(this._vc.__get__totalTime()) && this._vc.__get__totalTime() > 0; } this.controls[index].handle_mc.myEnabled = this.controls[index].myEnabled; this.controls[index].handle_mc.enabled = this.controls[index].handle_mc.myEnabled; this.controls[index].handle_mc._visible = this.controls[index].myEnabled; var v4 = !this._bufferingBarHides || this.controls[index].myEnabled || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined || !this.controls[mx.video.UIManager.BUFFERING_BAR]._visible; this.controls[index]._visible = v4; this.controls[index].progress_mc._visible = v4; this.controls[index].progress_mc.fill_mc._visible = v4; this.controls[index].fullness_mc._visible = v4; this.controls[index].progress_mc.fill_mc._visible = v4; break; case mx.video.UIManager.BUFFERING_BAR: switch (v3) { case mx.video.FLVPlayback.STOPPED: case mx.video.FLVPlayback.PLAYING: case mx.video.FLVPlayback.PAUSED: case mx.video.FLVPlayback.REWINDING: case mx.video.FLVPlayback.SEEKING: this.controls[index].myEnabled = false; break; default: this.controls[index].myEnabled = true; } this.controls[index]._visible = this.controls[index].myEnabled; this.controls[index].fill_mc._visible = this.controls[index].myEnabled; break; case mx.video.UIManager.PAUSE_BUTTON: switch (v3) { case mx.video.FLVPlayback.DISCONNECTED: case mx.video.FLVPlayback.STOPPED: case mx.video.FLVPlayback.PAUSED: case mx.video.FLVPlayback.REWINDING: this.controls[index].myEnabled = false; break; case mx.video.FLVPlayback.PLAYING: this.controls[index].myEnabled = true; break; case mx.video.FLVPlayback.BUFFERING: this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined; } if (this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] != undefined) { this.controls[index]._visible = this.controls[index].myEnabled; } break; case mx.video.UIManager.PLAY_BUTTON: switch (v3) { case mx.video.FLVPlayback.PLAYING: this.controls[index].myEnabled = false; break; case mx.video.FLVPlayback.STOPPED: case mx.video.FLVPlayback.PAUSED: this.controls[index].myEnabled = true; break; case mx.video.FLVPlayback.BUFFERING: this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined; } if (this.controls[mx.video.UIManager.PLAY_PAUSE_BUTTON] != undefined) { this.controls[index]._visible = !this.controls[mx.video.UIManager.PAUSE_BUTTON]._visible; } break; case mx.video.UIManager.STOP_BUTTON: switch (v3) { case mx.video.FLVPlayback.DISCONNECTED: case mx.video.FLVPlayback.STOPPED: this.controls[index].myEnabled = false; break; case mx.video.FLVPlayback.PAUSED: case mx.video.FLVPlayback.PLAYING: case mx.video.FLVPlayback.BUFFERING: this.controls[index].myEnabled = true; } break; case mx.video.UIManager.BACK_BUTTON: case mx.video.UIManager.FORWARD_BUTTON: if (v3 !== mx.video.FLVPlayback.BUFFERING) { } else { this.controls[index].myEnabled = !this._bufferingBarHides || this.controls[mx.video.UIManager.BUFFERING_BAR] == undefined; } } this.controls[index].enabled = this._controlsEnabled && this.controls[index].myEnabled; this._vc.__set__activeVideoPlayerIndex(v5); }; v2.setupSkinAutoHide = function () { var v2 = this._vc.getVideoPlayer(this._vc.__get__visibleVideoPlayerIndex()); if (this._skinAutoHide && this.skin_mc != undefined) { this.skinAutoHideHitTest(); if (this._skinAutoHideIntervalID == 0) { this._skinAutoHideIntervalID = setInterval(this, 'skinAutoHideHitTest', mx.video.UIManager.SKIN_AUTO_HIDE_INTERVAL); } } else { this.skin_mc._visible = this.__visible; clearInterval(this._skinAutoHideIntervalID); this._skinAutoHideIntervalID = 0; } }; v2.skinAutoHideHitTest = function () { if (!this.__visible) { this.skin_mc._visible = false; } else { var v4 = this._vc.getVideoPlayer(this._vc.__get__visibleVideoPlayerIndex()); var v3 = v4.hitTest(_root._xmouse, _root._ymouse, true); if (!v3 && this.border_mc != undefined) { v3 = this.border_mc.hitTest(_root._xmouse, _root._ymouse, true); } this.skin_mc._visible = v3; } }; v1.version = '1.0.1.10'; v1.shortVersion = '1.0.1'; v1.PAUSE_BUTTON = 0; v1.PLAY_BUTTON = 1; v1.STOP_BUTTON = 2; v1.SEEK_BAR_HANDLE = 3; v1.BACK_BUTTON = 4; v1.FORWARD_BUTTON = 5; v1.MUTE_ON_BUTTON = 6; v1.MUTE_OFF_BUTTON = 7; v1.VOLUME_BAR_HANDLE = 8; v1.NUM_BUTTONS = 9; v1.PLAY_PAUSE_BUTTON = 9; v1.MUTE_BUTTON = 10; v1.BUFFERING_BAR = 11; v1.SEEK_BAR = 12; v1.VOLUME_BAR = 13; v1.NUM_CONTROLS = 14; v1.UP_STATE = 0; v1.OVER_STATE = 1; v1.DOWN_STATE = 2; v1.SKIN_AUTO_HIDE_INTERVAL = 200; v1.VOLUME_BAR_INTERVAL_DEFAULT = 250; v1.VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT = 0; v1.SEEK_BAR_INTERVAL_DEFAULT = 250; v1.SEEK_BAR_SCRUB_TOLERANCE_DEFAULT = 5; v1.BUFFERING_DELAY_INTERVAL_DEFAULT = 1000; v2.addProperty('bufferingBarHidesAndDisablesOthers', v2.__get__bufferingBarHidesAndDisablesOthers, v2.__set__bufferingBarHidesAndDisablesOthers); v2.addProperty('bufferingDelayInterval', v2.__get__bufferingDelayInterval, v2.__set__bufferingDelayInterval); v2.addProperty('controlsEnabled', v2.__get__controlsEnabled, v2.__set__controlsEnabled); v2.addProperty('seekBarInterval', v2.__get__seekBarInterval, v2.__set__seekBarInterval); v2.addProperty('seekBarScrubTolerance', v2.__get__seekBarScrubTolerance, v2.__set__seekBarScrubTolerance); v2.addProperty('skin', v2.__get__skin, v2.__set__skin); v2.addProperty('skinAutoHide', v2.__get__skinAutoHide, v2.__set__skinAutoHide); v2.addProperty('skinReady', v2.__get__skinReady, function () {}); v2.addProperty('visible', v2.__get__visible, v2.__set__visible); v2.addProperty('volumeBarInterval', v2.__get__volumeBarInterval, v2.__set__volumeBarInterval); v2.addProperty('volumeBarScrubTolerance', v2.__get__volumeBarScrubTolerance, v2.__set__volumeBarScrubTolerance); ASSetPropFlags(mx.video.UIManager.prototype, null, 1); } #endinitclip } movieClip 10 __Packages.mx.video.VideoPlayer { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.VideoPlayer) { var v1 = function () { super(); mx.events.EventDispatcher.initialize(this); this._state = mx.video.VideoPlayer.DISCONNECTED; this._cachedState = this._state; this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; this._cachedPlayheadTime = 0; this._metadata = null; this._startingPlay = false; this._invalidSeekTime = false; this._invalidSeekRecovery = false; this._currentPos = 0; this._atEnd = false; this._cmdQueue = new Array(); this._readyDispatched = false; this._autoResizeDone = false; this._lastUpdateTime = -1; this._sawSeekNotify = false; this._updateTimeIntervalID = 0; this._updateTimeInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL; this._updateProgressIntervalID = 0; this._updateProgressInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL; this._idleTimeoutIntervalID = 0; this._idleTimeoutInterval = mx.video.VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL; this._autoResizeIntervalID = 0; this._rtmpDoStopAtEndIntervalID = 0; this._rtmpDoSeekIntervalID = 0; this._httpDoSeekIntervalID = 0; this._httpDoSeekCount = 0; this._finishAutoResizeIntervalID = 0; this._delayedBufferingIntervalID = 0; this._delayedBufferingInterval = mx.video.VideoPlayer.HTTP_DELAYED_BUFFERING_INTERVAL; if (this._isLive == undefined) { this._isLive = false; } if (this._autoSize == undefined) { this._autoSize = false; } if (this._aspectRatio == undefined) { this._aspectRatio = true; } if (this._autoPlay == undefined) { this._autoPlay = true; } if (this._autoRewind == undefined) { this._autoRewind = true; } if (this._bufferTime == undefined) { this._bufferTime = 0.1; } if (this._volume == undefined) { this._volume = 100; } this._sound = new Sound(this); this._sound.setVolume(this._volume); this.__visible = true; this._hiddenForResize = false; this._hiddenForResizeMetadataDelay = 0; this._contentPath = ''; }; mx.video.VideoPlayer = v1; mx.video.VideoPlayer extends MovieClip; var v2 = v1.prototype; v2.setSize = function (w, h) { if (w == this._video._width && h == this._video._height || this._autoSize) { return undefined; } this._video._width = w; this._video._height = h; if (this._aspectRatio) { this.startAutoResize(); } }; v2.setScale = function (xs, ys) { if (xs == this._video._xscale && ys == this._video._yscale || this._autoSize) { return undefined; } this._video._xscale = xs; this._video._yscale = ys; if (this._aspectRatio) { this.startAutoResize(); } }; v2.play = function (url, isLive, totalTime) { if (url != null && url != undefined) { if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) { this._state = this._cachedState; } else { if (!this.__get__stateResponsive()) { this.queueCmd(mx.video.VideoPlayer.PLAY, url, isLive, totalTime); return undefined; } else { this.execQueuedCmds(); } } this._autoPlay = true; this._load(url, isLive, totalTime); return undefined; } if (!this.isXnOK()) { if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr == undefined || this._ncMgr.getNetConnection() == null || this._ncMgr.getNetConnection() == undefined) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); } else { this.flushQueuedCmds(); this.queueCmd(mx.video.VideoPlayer.PLAY); this.setState(mx.video.VideoPlayer.LOADING); this._cachedState = mx.video.VideoPlayer.LOADING; this._ncMgr.reconnect(); return undefined; } } else { if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) { this._state = this._cachedState; } else { if (!this.__get__stateResponsive()) { this.queueCmd(mx.video.VideoPlayer.PLAY); return undefined; } else { this.execQueuedCmds(); } } } if (this._ns == null || this._ns == undefined) { this._createStream(); this._video.attachVideo(this._ns); this.attachAudio(this._ns); } switch (this._state) { case mx.video.VideoPlayer.BUFFERING: if (this._ncMgr.isRTMP()) { this._play(0); if (this._atEnd) { this._atEnd = false; this._currentPos = 0; this.setState(mx.video.VideoPlayer.REWINDING); } else { if (this._currentPos > 0) { this._seek(this._currentPos); this._currentPos = 0; } } } case mx.video.VideoPlayer.PLAYING: return undefined; case mx.video.VideoPlayer.STOPPED: if (this._ncMgr.isRTMP()) { if (this._isLive) { this._play(-1); this.setState(mx.video.VideoPlayer.BUFFERING); } else { this._play(0); if (this._atEnd) { this._atEnd = false; this._currentPos = 0; this._state = mx.video.VideoPlayer.BUFFERING; this.setState(mx.video.VideoPlayer.REWINDING); } else { if (this._currentPos > 0) { this._seek(this._currentPos); this._currentPos = 0; this.setState(mx.video.VideoPlayer.BUFFERING); } else { this.setState(mx.video.VideoPlayer.BUFFERING); } } } } else { this._pause(false); if (this._atEnd) { this._atEnd = false; this._seek(0); this._state = mx.video.VideoPlayer.BUFFERING; this.setState(mx.video.VideoPlayer.REWINDING); } else { if (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY) { this.setState(mx.video.VideoPlayer.BUFFERING); } else { this.setState(mx.video.VideoPlayer.PLAYING); } } } break; case mx.video.VideoPlayer.PAUSED: this._pause(false); if (!this._ncMgr.isRTMP()) { if (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY) { this.setState(mx.video.VideoPlayer.BUFFERING); } else { this.setState(mx.video.VideoPlayer.PLAYING); } } else { this.setState(mx.video.VideoPlayer.BUFFERING); } } }; v2.load = function (url, isLive, totalTime) { if (url == null || url == undefined) { throw new Error('null url sent to VideoPlayer.load'); } if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) { this._state = this._cachedState; } else { if (!this.__get__stateResponsive()) { this.queueCmd(mx.video.VideoPlayer.LOAD, url, isLive, totalTime); return undefined; } else { this.execQueuedCmds(); } } this._autoPlay = false; this._load(url, isLive, totalTime); }; v2._load = function (url, isLive, totalTime) { this._prevVideoWidth = this.videoWidth; if (this._prevVideoWidth == undefined) { this._prevVideoWidth = this._video.width; if (this._prevVideoWidth == undefined) { this._prevVideoWidth = 0; } } this._prevVideoHeight = this.videoHeight; if (this._prevVideoHeight == undefined) { this._prevVideoHeight = this._video.height; if (this._prevVideoHeight == undefined) { this._prevVideoHeight = 0; } } this._autoResizeDone = false; this._cachedPlayheadTime = 0; this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; this._metadata = null; this._startingPlay = false; this._invalidSeekTime = false; this._invalidSeekRecovery = false; this._isLive = (isLive == undefined) ? false : isLive; this._contentPath = url; this._currentPos = 0; this._streamLength = totalTime; this._atEnd = false; this._videoWidth = undefined; this._videoHeight = undefined; this._readyDispatched = false; this._lastUpdateTime = -1; this._sawSeekNotify = false; clearInterval(this._updateTimeIntervalID); this._updateTimeIntervalID = 0; clearInterval(this._updateProgressIntervalID); this._updateProgressIntervalID = 0; clearInterval(this._idleTimeoutIntervalID); this._idleTimeoutIntervalID = 0; clearInterval(this._autoResizeIntervalID); this._autoResizeIntervalID = 0; clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; clearInterval(this._rtmpDoSeekIntervalID); this._rtmpDoSeekIntervalID = 0; clearInterval(this._httpDoSeekIntervalID); this._httpDoSeekIntervalID = 0; clearInterval(this._finishAutoResizeIntervalID); this._finishAutoResizeIntervalID = 0; clearInterval(this._delayedBufferingIntervalID); this._delayedBufferingIntervalID = 0; this.closeNS(false); if (this._ncMgr == null || this._ncMgr == undefined) { this.createINCManager(); } var v2 = this._ncMgr.connectToURL(this._contentPath); this.setState(mx.video.VideoPlayer.LOADING); this._cachedState = mx.video.VideoPlayer.LOADING; if (v2) { this._createStream(); this._setUpStream(); } if (!this._ncMgr.isRTMP()) { clearInterval(this._updateProgressIntervalID); this._updateProgressIntervalID = setInterval(this, 'doUpdateProgress', this._updateProgressInterval); } }; v2.pause = function () { if (!this.isXnOK()) { if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr == undefined || this._ncMgr.getNetConnection() == null || this._ncMgr.getNetConnection() == undefined) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); } else { return undefined; } } else { if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) { this._state = this._cachedState; } else { if (!this.__get__stateResponsive()) { this.queueCmd(mx.video.VideoPlayer.PAUSE); return undefined; } else { this.execQueuedCmds(); } } } if (this._state == mx.video.VideoPlayer.PAUSED || this._state == mx.video.VideoPlayer.STOPPED || this._ns == null || this._ns == undefined) { return undefined; } this._pause(true); this.setState(mx.video.VideoPlayer.PAUSED); }; v2.stop = function () { if (!this.isXnOK()) { if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr == undefined || this._ncMgr.getNetConnection() == null || this._ncMgr.getNetConnection() == undefined) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); } else { return undefined; } } else { if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) { this._state = this._cachedState; } else { if (!this.__get__stateResponsive()) { this.queueCmd(mx.video.VideoPlayer.STOP); return undefined; } else { this.execQueuedCmds(); } } } if (this._state == mx.video.VideoPlayer.STOPPED || this._ns == null || this._ns == undefined) { return undefined; } if (this._ncMgr.isRTMP()) { if (this._autoRewind && !this._isLive) { this._currentPos = 0; this._play(0, 0); this._state = mx.video.VideoPlayer.STOPPED; this.setState(mx.video.VideoPlayer.REWINDING); } else { this.closeNS(true); this.setState(mx.video.VideoPlayer.STOPPED); } } else { this._pause(true); if (this._autoRewind) { this._seek(0); this._state = mx.video.VideoPlayer.STOPPED; this.setState(mx.video.VideoPlayer.REWINDING); } else { this.setState(mx.video.VideoPlayer.STOPPED); } } }; v2.seek = function (time) { if (this._invalidSeekTime) { return undefined; } if (isNaN(time) || time < 0) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK); } if (!this.isXnOK()) { if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ncMgr == null || this._ncMgr == undefined || this._ncMgr.getNetConnection() == null || this._ncMgr.getNetConnection() == undefined) { throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION); } else { this.flushQueuedCmds(); this.queueCmd(mx.video.VideoPlayer.SEEK, null, false, time); this.setState(mx.video.VideoPlayer.LOADING); this._cachedState = mx.video.VideoPlayer.LOADING; this._ncMgr.reconnect(); return undefined; } } else { if (this._state == mx.video.VideoPlayer.EXEC_QUEUED_CMD) { this._state = this._cachedState; } else { if (!this.__get__stateResponsive()) { this.queueCmd(mx.video.VideoPlayer.SEEK, null, false, time); return undefined; } else { this.execQueuedCmds(); } } } if (this._ns == null || this._ns == undefined) { this._createStream(); this._video.attachVideo(this._ns); this.attachAudio(this._ns); } if (this._atEnd && time < this.__get__playheadTime()) { this._atEnd = false; } switch (this._state) { case mx.video.VideoPlayer.PLAYING: this._state = mx.video.VideoPlayer.BUFFERING; case mx.video.VideoPlayer.BUFFERING: case mx.video.VideoPlayer.PAUSED: this._seek(time); this.setState(mx.video.VideoPlayer.SEEKING); break; case mx.video.VideoPlayer.STOPPED: if (this._ncMgr.isRTMP()) { this._play(0); this._pause(true); } this._seek(time); this._state = mx.video.VideoPlayer.PAUSED; this.setState(mx.video.VideoPlayer.SEEKING); } }; v2.close = function () { this.closeNS(true); if (this._ncMgr != null && this._ncMgr != undefined && this._ncMgr.isRTMP()) { this._ncMgr.close(); } this.setState(mx.video.VideoPlayer.DISCONNECTED); this.dispatchEvent({'type': 'close', 'state': this._state, 'playheadTime': this.__get__playheadTime()}); }; v2.__get__x = function () { return this._x; }; v2.__set__x = function (xpos) { this._x = xpos; return this.__get__x(); }; v2.__get__y = function () { return this._y; }; v2.__set__y = function (ypos) { this._y = ypos; return this.__get__y(); }; v2.__get__scaleX = function () { return this._video._xscale; }; v2.__set__scaleX = function (xs) { this.setScale(xs, this.__get__scaleY()); return this.__get__scaleX(); }; v2.__get__scaleY = function () { return this._video._yscale; }; v2.__set__scaleY = function (ys) { this.setScale(this.__get__scaleX(), ys); return this.__get__scaleY(); }; v2.__get__width = function () { return this._video._width; }; v2.__set__width = function (w) { this.setSize(w, this._video._height); return this.__get__width(); }; v2.__get__height = function () { return this._video._height; }; v2.__set__height = function (h) { this.setSize(this._video._width, h); return this.__get__height(); }; v2.__get__videoWidth = function () { if (this._readyDispatched) { this._videoWidth = this._video.width; } return this._videoWidth; }; v2.__get__videoHeight = function () { if (this._readyDispatched) { this._videoHeight = this._video.height; } return this._videoHeight; }; v2.__get__visible = function () { if (!this._hiddenForResize) { this.__visible = this._visible; } return this.__visible; }; v2.__set__visible = function (v) { this.__visible = v; if (!this._hiddenForResize) { this._visible = this.__visible; } return this.__get__visible(); }; v2.__get__autoSize = function () { return this._autoSize; }; v2.__set__autoSize = function (flag) { if (this._autoSize != flag) { this._autoSize = flag; if (this._autoSize) { this.startAutoResize(); } } return this.__get__autoSize(); }; v2.__get__maintainAspectRatio = function () { return this._aspectRatio; }; v2.__set__maintainAspectRatio = function (flag) { if (this._aspectRatio != flag) { this._aspectRatio = flag; if (this._aspectRatio && !this._autoSize) { this.startAutoResize(); } } return this.__get__maintainAspectRatio(); }; v2.__get__autoRewind = function () { return this._autoRewind; }; v2.__set__autoRewind = function (flag) { this._autoRewind = flag; return this.__get__autoRewind(); }; v2.__get__playheadTime = function () { var v2 = (this._ns == null || this._ns == undefined) ? this._currentPos : this._ns.time; if (this._metadata.audiodelay != undefined) { v2 -= this._metadata.audiodelay; if (v2 < 0) { v2 = 0; } } return v2; }; v2.__set__playheadTime = function (position) { this.seek(position); return this.__get__playheadTime(); }; v2.__get__url = function () { return this._contentPath; }; v2.__get__volume = function () { return this._volume; }; v2.__set__volume = function (aVol) { this._volume = aVol; if (!this._hiddenForResize) { this._sound.setVolume(this._volume); } return this.__get__volume(); }; v2.__get__transform = function () { return this._sound.getTransform(); }; v2.__set__transform = function (s) { this._sound.setTransform(s); return this.__get__transform(); }; v2.__get__isRTMP = function () { if (this._ncMgr == null || this._ncMgr == undefined) { return undefined; } return this._ncMgr.isRTMP(); }; v2.__get__isLive = function () { return this._isLive; }; v2.__get__state = function () { return this._state; }; v2.__get__stateResponsive = function () { switch (this._state) { return false; case mx.video.VideoPlayer.DISCONNECTED: case mx.video.VideoPlayer.STOPPED: case mx.video.VideoPlayer.PLAYING: case mx.video.VideoPlayer.PAUSED: case mx.video.VideoPlayer.BUFFERING: return true; } return false; }; v2.__get__bytesLoaded = function () { if (this._ns == null || this._ns == undefined || this._ncMgr.isRTMP()) { return -1; } return this._ns.bytesLoaded; }; v2.__get__bytesTotal = function () { if (this._ns == null || this._ns == undefined || this._ncMgr.isRTMP()) { return -1; } return this._ns.bytesTotal; }; v2.__get__totalTime = function () { return this._streamLength; }; v2.__get__bufferTime = function () { return this._bufferTime; }; v2.__set__bufferTime = function (aTime) { this._bufferTime = aTime; if (this._ns != null && this._ns != undefined) { this._ns.setBufferTime(this._bufferTime); } return this.__get__bufferTime(); }; v2.__get__idleTimeout = function () { return this._idleTimeoutInterval; }; v2.__set__idleTimeout = function (aTime) { this._idleTimeoutInterval = aTime; if (this._idleTimeoutIntervalID > 0) { clearInterval(this._idleTimeoutIntervalID); this._idleTimeoutIntervalID = setInterval(this, 'doIdleTimeout', this._idleTimeoutInterval); } return this.__get__idleTimeout(); }; v2.__get__playheadUpdateInterval = function () { return this._updateTimeInterval; }; v2.__set__playheadUpdateInterval = function (aTime) { this._updateTimeInterval = aTime; if (this._updateTimeIntervalID > 0) { clearInterval(this._updateTimeIntervalID); this._updateTimeIntervalID = setInterval(this, 'doUpdateTime', this._updateTimeInterval); } return this.__get__playheadUpdateInterval(); }; v2.__get__progressInterval = function () { return this._updateProgressInterval; }; v2.__set__progressInterval = function (aTime) { this._updateProgressInterval = aTime; if (this._updateProgressIntervalID > 0) { clearInterval(this._updateProgressIntervalID); this._updateProgressIntervalID = setInterval(this, 'doUpdateProgress', this._updateProgressInterval); } return this.__get__progressInterval(); }; v2.__get__ncMgr = function () { if (this._ncMgr == null || this._ncMgr == undefined) { this.createINCManager(); } return this._ncMgr; }; v2.__get__metadata = function () { return this._metadata; }; v2.doUpdateTime = function () { var v2 = this.__get__playheadTime(); switch (this._state) { if (this._state !== mx.video.VideoPlayer.CONNECTION_ERROR) { } else { case mx.video.VideoPlayer.STOPPED: case mx.video.VideoPlayer.PAUSED: case mx.video.VideoPlayer.DISCONNECTED: clearInterval(this._updateTimeIntervalID); this._updateTimeIntervalID = 0; } } if (this._lastUpdateTime != v2) { this.dispatchEvent({'type': 'playheadUpdate', 'state': this._state, 'playheadTime': v2}); this._lastUpdateTime = v2; } }; v2.doUpdateProgress = function () { if (this._ns == null || this._ns == undefined) { return undefined; } if (this._ns.bytesTotal >= 0) { this.dispatchEvent({'type': 'progress', 'bytesLoaded': this._ns.bytesLoaded, 'bytesTotal': this._ns.bytesTotal}); } if (this._state == mx.video.VideoPlayer.DISCONNECTED || this._state == mx.video.VideoPlayer.CONNECTION_ERROR || this._ns.bytesLoaded == this._ns.bytesTotal) { clearInterval(this._updateProgressIntervalID); this._updateProgressIntervalID = 0; } }; v2.rtmpOnStatus = function (info) { if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR) { return undefined; } switch (info.code) { case 'NetStream.Play.Stop': if (this._startingPlay) { return undefined; } switch (this._state) { case mx.video.VideoPlayer.RESIZING: if (this._hiddenForResize) { this.finishAutoResize(); } break; case mx.video.VideoPlayer.LOADING: break; case mx.video.VideoPlayer.STOPPED: case mx.video.VideoPlayer.PAUSED: default: this._sawPlayStop = true; } break; case 'NetStream.Buffer.Empty': if (this._bufferState !== mx.video.VideoPlayer.BUFFER_FULL) { } else { if (this._sawPlayStop) { this.rtmpDoStopAtEnd(true); } else { if (this._state == mx.video.VideoPlayer.PLAYING) { this.setState(mx.video.VideoPlayer.BUFFERING); } } } this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; break; case 'NetStream.Buffer.Flush': if (this._sawSeekNotify && this._state == mx.video.VideoPlayer.SEEKING) { this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; this.setStateFromCachedState(); this.doUpdateTime(); } if (this._sawPlayStop && (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY || this._bufferTime <= 0.1 && this._ns.bufferLength <= 0.1)) { this._cachedPlayheadTime = this.playheadTime; clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = setInterval(this, 'rtmpDoStopAtEnd', mx.video.VideoPlayer.RTMP_DO_STOP_AT_END_INTERVAL); } switch (this._bufferState) { case mx.video.VideoPlayer.BUFFER_EMPTY: if (!this._hiddenForResize) { if (this._state == mx.video.VideoPlayer.LOADING && this._cachedState == mx.video.VideoPlayer.PLAYING || this._state == mx.video.VideoPlayer.BUFFERING) { this.setState(mx.video.VideoPlayer.PLAYING); } else { if (this._cachedState == mx.video.VideoPlayer.BUFFERING) { this._cachedState = mx.video.VideoPlayer.PLAYING; } } } this._bufferState = mx.video.VideoPlayer.BUFFER_FLUSH; break; default: if (this._state == mx.video.VideoPlayer.BUFFERING) { this.setStateFromCachedState(); } } break; case 'NetStream.Buffer.Full': if (this._sawSeekNotify && this._state == mx.video.VideoPlayer.SEEKING) { this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; this.setStateFromCachedState(); this.doUpdateTime(); } switch (this._bufferState) { case mx.video.VideoPlayer.BUFFER_EMPTY: this._bufferState = mx.video.VideoPlayer.BUFFER_FULL; if (!this._hiddenForResize) { if (this._state == mx.video.VideoPlayer.LOADING && this._cachedState == mx.video.VideoPlayer.PLAYING || this._state == mx.video.VideoPlayer.BUFFERING) { this.setState(mx.video.VideoPlayer.PLAYING); } else { if (this._cachedState == mx.video.VideoPlayer.BUFFERING) { this._cachedState = mx.video.VideoPlayer.PLAYING; } } if (this._rtmpDoStopAtEndIntervalID != 0) { this._sawPlayStop = true; clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; } } break; case mx.video.VideoPlayer.BUFFER_FLUSH: this._bufferState = mx.video.VideoPlayer.BUFFER_FULL; if (this._rtmpDoStopAtEndIntervalID != 0) { this._sawPlayStop = true; clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; } } if (this._state == mx.video.VideoPlayer.BUFFERING) { this.setStateFromCachedState(); } break; case 'NetStream.Pause.Notify': if (this._state == mx.video.VideoPlayer.RESIZING && this._hiddenForResize) { this.finishAutoResize(); } break; case 'NetStream.Unpause.Notify': if (this._state == mx.video.VideoPlayer.PAUSED) { this._state = mx.video.VideoPlayer.PLAYING; this.setState(mx.video.VideoPlayer.BUFFERING); } else { this._cachedState = mx.video.VideoPlayer.PLAYING; } break; case 'NetStream.Play.Start': clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; if (this._startingPlay) { this._startingPlay = false; this._cachedPlayheadTime = this.playheadTime; } else { if (this._state == mx.video.VideoPlayer.PLAYING) { this.setState(mx.video.VideoPlayer.BUFFERING); } } break; case 'NetStream.Play.Reset': clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; if (this._state == mx.video.VideoPlayer.REWINDING) { clearInterval(this._rtmpDoSeekIntervalID); this._rtmpDoSeekIntervalID = 0; if (this.__get__playheadTime() == 0 || this.__get__playheadTime() < this._cachedPlayheadTime) { this.setStateFromCachedState(); } else { this._cachedPlayheadTime = this.playheadTime; this._rtmpDoSeekIntervalID = setInterval(this, 'rtmpDoSeek', mx.video.VideoPlayer.RTMP_DO_SEEK_INTERVAL); } } break; case 'NetStream.Seek.Notify': if (this.__get__playheadTime() != this._cachedPlayheadTime) { this.setStateFromCachedState(); this.doUpdateTime(); } else { this._sawSeekNotify = true; if (this._rtmpDoSeekIntervalID == 0) { this._rtmpDoSeekIntervalID = setInterval(this, 'rtmpDoSeek', mx.video.VideoPlayer.RTMP_DO_SEEK_INTERVAL); } } break; break; case 'Netstream.Play.UnpublishNotify': case 'Netstream.Play.PublishNotify': break; case 'NetStream.Play.StreamNotFound': if (!this._ncMgr.connectAgain()) { this.setState(mx.video.VideoPlayer.CONNECTION_ERROR); } break; case 'NetStream.Play.Failed': case 'NetStream.Failed': this.setState(mx.video.VideoPlayer.CONNECTION_ERROR); } }; v2.httpOnStatus = function (info) { switch (info.code) { case 'NetStream.Play.Stop': clearInterval(this._delayedBufferingIntervalID); this._delayedBufferingIntervalID = 0; if (this._invalidSeekTime) { this._invalidSeekTime = false; this._invalidSeekRecovery = true; this.setState(this._cachedState); this.seek(this.__get__playheadTime()); } else { switch (this._state) { if (this._state !== mx.video.VideoPlayer.SEEKING) { } else { case mx.video.VideoPlayer.PLAYING: case mx.video.VideoPlayer.BUFFERING: this.httpDoStopAtEnd(); } } } break; case 'NetStream.Seek.InvalidTime': if (this._invalidSeekRecovery) { this._invalidSeekTime = false; this._invalidSeekRecovery = false; this.setState(this._cachedState); this.seek(0); } else { this._invalidSeekTime = true; } break; case 'NetStream.Buffer.Empty': this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; if (this._state == mx.video.VideoPlayer.PLAYING) { clearInterval(this._delayedBufferingIntervalID); this._delayedBufferingIntervalID = setInterval(this, 'doDelayedBuffering', this._delayedBufferingInterval); } break; case 'NetStream.Buffer.Full': case 'NetStream.Buffer.Flush': clearInterval(this._delayedBufferingIntervalID); this._delayedBufferingIntervalID = 0; this._bufferState = mx.video.VideoPlayer.BUFFER_FULL; if (!this._hiddenForResize) { if (this._state == mx.video.VideoPlayer.LOADING && this._cachedState == mx.video.VideoPlayer.PLAYING || this._state == mx.video.VideoPlayer.BUFFERING) { this.setState(mx.video.VideoPlayer.PLAYING); } else { if (this._cachedState == mx.video.VideoPlayer.BUFFERING) { this._cachedState = mx.video.VideoPlayer.PLAYING; } } } break; case 'NetStream.Seek.Notify': this._invalidSeekRecovery = false; switch (this._state) { if (this._state !== mx.video.VideoPlayer.REWINDING) { } else { case mx.video.VideoPlayer.SEEKING: if (this._httpDoSeekIntervalID == 0) { this._httpDoSeekCount = 0; this._httpDoSeekIntervalID = setInterval(this, 'httpDoSeek', mx.video.VideoPlayer.HTTP_DO_SEEK_INTERVAL); } } } break; case 'NetStream.Play.StreamNotFound': this.setState(mx.video.VideoPlayer.CONNECTION_ERROR); } }; v2.ncConnected = function () { if (this._ncMgr == null || this._ncMgr == undefined || this._ncMgr.getNetConnection() == null || this._ncMgr.getNetConnection() == undefined) { this.setState(mx.video.VideoPlayer.CONNECTION_ERROR); } else { this._createStream(); this._setUpStream(); } }; v2.ncReconnected = function () { if (this._ncMgr == null || this._ncMgr == undefined || this._ncMgr.getNetConnection() == null || this._ncMgr.getNetConnection() == undefined) { this.setState(mx.video.VideoPlayer.CONNECTION_ERROR); } else { this._ns = null; this._state = mx.video.VideoPlayer.STOPPED; this.execQueuedCmds(); } }; v2.onMetaData = function (info) { if (this._metadata != null) { return undefined; } this._metadata = info; if (this._streamLength == undefined || this._streamLength == null || this._streamLength <= 0) { this._streamLength = info.duration; } if (isNaN(this._videoWidth) || this._videoWidth <= 0) { this._videoWidth = info.width; } if (isNaN(this._videoHeight) || this._videoHeight <= 0) { this._videoHeight = info.height; } this.dispatchEvent({'type': 'metadataReceived', 'info': info}); }; v2.onCuePoint = function (info) { if (!this._hiddenForResize || !isNaN(this._hiddenRewindPlayheadTime) && this.__get__playheadTime() < this._hiddenRewindPlayheadTime) { this.dispatchEvent({'type': 'cuePoint', 'info': info}); } }; v2.setState = function (s) { if (s == this._state) { return undefined; } this._hiddenRewindPlayheadTime = undefined; this._cachedState = this._state; this._cachedPlayheadTime = this.playheadTime; this._state = s; var v2 = this._state; this.dispatchEvent({'type': 'stateChange', 'state': v2, 'playheadTime': this.__get__playheadTime()}); if (!this._readyDispatched) { switch (v2) { if (v2 !== mx.video.VideoPlayer.BUFFERING) { } else { case mx.video.VideoPlayer.STOPPED: case mx.video.VideoPlayer.PLAYING: case mx.video.VideoPlayer.PAUSED: this._readyDispatched = true; this.dispatchEvent({'type': 'ready', 'state': v2, 'playheadTime': this.__get__playheadTime()}); } } } if (this._cachedState !== mx.video.VideoPlayer.REWINDING) { } else { this.dispatchEvent({'type': 'rewind', 'state': v2, 'playheadTime': this.__get__playheadTime()}); if (this._ncMgr.isRTMP() && v2 == mx.video.VideoPlayer.STOPPED) { this.closeNS(); } } switch (v2) { case mx.video.VideoPlayer.STOPPED: case mx.video.VideoPlayer.PAUSED: if (this._ncMgr.isRTMP() && this._idleTimeoutIntervalID == 0) { this._idleTimeoutIntervalID = setInterval(this, 'doIdleTimeout', this._idleTimeoutInterval); } break; case mx.video.VideoPlayer.SEEKING: case mx.video.VideoPlayer.REWINDING: this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; case mx.video.VideoPlayer.PLAYING: case mx.video.VideoPlayer.BUFFERING: if (this._updateTimeIntervalID == 0) { this._updateTimeIntervalID = setInterval(this, 'doUpdateTime', this._updateTimeInterval); } case mx.video.VideoPlayer.LOADING: case mx.video.VideoPlayer.RESIZING: clearInterval(this._idleTimeoutIntervalID); this._idleTimeoutIntervalID = 0; } this.execQueuedCmds(); }; v2.setStateFromCachedState = function () { switch (this._cachedState) { case mx.video.VideoPlayer.PLAYING: case mx.video.VideoPlayer.PAUSED: this.setState(this._cachedState); break; case mx.video.VideoPlayer.BUFFERING: if (this._bufferState == mx.video.VideoPlayer.BUFFER_EMPTY) { this.setState(mx.video.VideoPlayer.BUFFERING); } else { this.setState(this._cachedState); } break; default: this.setState(mx.video.VideoPlayer.STOPPED); } }; v2.createINCManager = function () { if (this.ncMgrClassName == null || this.ncMgrClassName == undefined) { this.ncMgrClassName = mx.video.VideoPlayer.DEFAULT_INCMANAGER; } var ncMgrConstructor = eval(this.ncMgrClassName); this._ncMgr = new ncMgrConstructor(); this._ncMgr.setVideoPlayer(this); }; v2.rtmpDoStopAtEnd = function (force) { if (this._rtmpDoStopAtEndIntervalID > 0) { switch (this._state) { if (this._state !== mx.video.VideoPlayer.CONNECTION_ERROR) { } else { case mx.video.VideoPlayer.DISCONNECTED: clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; return undefined; } } if (force || this._cachedPlayheadTime == this.__get__playheadTime()) { clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; } else { this._cachedPlayheadTime = this.playheadTime; return undefined; } } this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; this._atEnd = true; this.setState(mx.video.VideoPlayer.STOPPED); if (this._state != mx.video.VideoPlayer.STOPPED) { return undefined; } this.doUpdateTime(); if (this._state != mx.video.VideoPlayer.STOPPED) { return undefined; } this.dispatchEvent({'type': 'complete', 'state': this._state, 'playheadTime': this.__get__playheadTime()}); if (this._state != mx.video.VideoPlayer.STOPPED) { return undefined; } if (this._autoRewind && !this._isLive && this.__get__playheadTime() != 0) { this._atEnd = false; this._currentPos = 0; this._play(0, 0); this.setState(mx.video.VideoPlayer.REWINDING); } else { this.closeNS(); } }; v2.rtmpDoSeek = function () { if (this._state != mx.video.VideoPlayer.REWINDING && this._state != mx.video.VideoPlayer.SEEKING) { clearInterval(this._rtmpDoSeekIntervalID); this._rtmpDoSeekIntervalID = 0; this._sawSeekNotify = false; } else { if (this.__get__playheadTime() != this._cachedPlayheadTime) { clearInterval(this._rtmpDoSeekIntervalID); this._rtmpDoSeekIntervalID = 0; this._sawSeekNotify = false; this.setStateFromCachedState(); this.doUpdateTime(); } } }; v2.httpDoStopAtEnd = function () { this._atEnd = true; if (this._streamLength == undefined || this._streamLength == null || this._streamLength <= 0) { this._streamLength = this._ns.time; } this._pause(true); this.setState(mx.video.VideoPlayer.STOPPED); if (this._state != mx.video.VideoPlayer.STOPPED) { return undefined; } this.doUpdateTime(); if (this._state != mx.video.VideoPlayer.STOPPED) { return undefined; } this.dispatchEvent({'type': 'complete', 'state': this._state, 'playheadTime': this.__get__playheadTime()}); if (this._state != mx.video.VideoPlayer.STOPPED) { return undefined; } if (this._autoRewind) { this._atEnd = false; this._pause(true); this._seek(0); this.setState(mx.video.VideoPlayer.REWINDING); } }; v2.httpDoSeek = function () { var v2 = this._state == mx.video.VideoPlayer.REWINDING || this._state == mx.video.VideoPlayer.SEEKING; if (v2 && this._httpDoSeekCount < mx.video.VideoPlayer.HTTP_DO_SEEK_MAX_COUNT && (this._cachedPlayheadTime == this.__get__playheadTime() || this._invalidSeekTime)) { ++this._httpDoSeekCount; return undefined; } this._httpDoSeekCount = 0; clearInterval(this._httpDoSeekIntervalID); this._httpDoSeekIntervalID = 0; if (!v2) { return undefined; } this.setStateFromCachedState(); if (this._invalidSeekTime) { this._invalidSeekTime = false; this._invalidSeekRecovery = true; this.seek(this.__get__playheadTime()); } else { this.doUpdateTime(); } }; v2.closeNS = function (updateCurrentPos) { if (this._ns != null && this._ns != undefined) { if (updateCurrentPos) { clearInterval(this._updateTimeIntervalID); this._updateTimeIntervalID = 0; this.doUpdateTime(); this._currentPos = this._ns.time; } delete this._ns.onStatus; this._ns.onStatus = null; this._ns.close(); this._ns = null; } }; v2.doDelayedBuffering = function () { switch (this._state) { case mx.video.VideoPlayer.LOADING: case mx.video.VideoPlayer.RESIZING: break; case mx.video.VideoPlayer.PLAYING: clearInterval(this._delayedBufferingIntervalID); this._delayedBufferingIntervalID = 0; this.setState(mx.video.VideoPlayer.BUFFERING); break; default: clearInterval(this._delayedBufferingIntervalID); this._delayedBufferingIntervalID = 0; } }; v2._pause = function (doPause) { clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; this._ns.pause(doPause); }; v2._play = function () { clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; this._startingPlay = true; switch (arguments.length) { case 0: this._ns.play(this._ncMgr.getStreamName(), this._isLive ? -1 : 0, -1); break; case 1: this._ns.play(this._ncMgr.getStreamName(), this._isLive ? -1 : arguments[0], -1); break; case 2: this._ns.play(this._ncMgr.getStreamName(), this._isLive ? -1 : arguments[0], arguments[1]); break; default: throw new Error('bad args to _play'); } }; v2._seek = function (time) { clearInterval(this._rtmpDoStopAtEndIntervalID); this._rtmpDoStopAtEndIntervalID = 0; if (this._metadata.audiodelay != undefined && time + this._metadata.audiodelay < this._streamLength) { time += this._metadata.audiodelay; } this._ns.seek(time); this._invalidSeekTime = false; this._bufferState = mx.video.VideoPlayer.BUFFER_EMPTY; this._sawPlayStop = false; this._sawSeekNotify = false; }; v2.isXnOK = function () { if (this._state == mx.video.VideoPlayer.LOADING) { return true; } if (this._state == mx.video.VideoPlayer.CONNECTION_ERROR) { return false; } if (this._state != mx.video.VideoPlayer.DISCONNECTED) { if (this._ncMgr == null || this._ncMgr == undefined || this._ncMgr.getNetConnection() == null || this._ncMgr.getNetConnection() == undefined || !(this._ncMgr.getNetConnection()).isConnected) { this.setState(mx.video.VideoPlayer.DISCONNECTED); return false; } return true; } return false; }; v2.startAutoResize = function () { switch (this._state) { if (this._state !== mx.video.VideoPlayer.CONNECTION_ERROR) { } else { case mx.video.VideoPlayer.DISCONNECTED: return undefined; } } this._autoResizeDone = false; if (this.__get__stateResponsive() && this._videoWidth != undefined && this._videoHeight != undefined) { this.doAutoResize(); } else { clearInterval(this._autoResizeIntervalID); this._autoResizeIntervalID = setInterval(this, 'doAutoResize', mx.video.VideoPlayer.AUTO_RESIZE_INTERVAL); } }; v2.doAutoResize = function () { if (this._autoResizeIntervalID > 0) { switch (this._state) { case mx.video.VideoPlayer.RESIZING: case mx.video.VideoPlayer.LOADING: break; case mx.video.VideoPlayer.DISCONNECTED: case mx.video.VideoPlayer.CONNECTION_ERROR: clearInterval(this._autoResizeIntervalID); this._autoResizeIntervalID = 0; return undefined; default: if (this.__get__stateResponsive()) break; return undefined; } if (this._video.width != this._prevVideoWidth || this._video.height != this._prevVideoHeight || this._bufferState == mx.video.VideoPlayer.BUFFER_FULL || this._bufferState == mx.video.VideoPlayer.BUFFER_FLUSH || this._ns.time > mx.video.VideoPlayer.AUTO_RESIZE_PLAYHEAD_TIMEOUT) { if (this._hiddenForResize && this._metadata == null && this._hiddenForResizeMetadataDelay < mx.video.VideoPlayer.AUTO_RESIZE_METADATA_DELAY_MAX) { ++this._hiddenForResizeMetadataDelay; return undefined; } this._videoWidth = this._video.width; this._videoHeight = this._video.height; clearInterval(this._autoResizeIntervalID); this._autoResizeIntervalID = 0; } else { return undefined; } } if (!this._autoSize && !this._aspectRatio || this._autoResizeDone) { this.setState(this._cachedState); return undefined; } this._autoResizeDone = true; if (this._autoSize) { this._video._width = this._videoWidth; this._video._height = this._videoHeight; } else { if (this._aspectRatio) { var v3 = this._videoWidth * this.__get__height() / this._videoHeight; var v2 = this._videoHeight * this.__get__width() / this._videoWidth; if (v2 < this.__get__height()) { this._video._height = v2; } else { if (v3 < this.__get__width()) { this._video._width = v3; } } } } if (this._hiddenForResize) { this._hiddenRewindPlayheadTime = this.playheadTime; if (this._state == mx.video.VideoPlayer.LOADING) { this._cachedState = mx.video.VideoPlayer.PLAYING; } if (!this._ncMgr.isRTMP()) { this._pause(true); this._seek(0); clearInterval(this._finishAutoResizeIntervalID); this._finishAutoResizeIntervalID = setInterval(this, 'finishAutoResize', mx.video.VideoPlayer.FINISH_AUTO_RESIZE_INTERVAL); } else { if (!this._isLive) { this._currentPos = 0; this._play(0, 0); this.setState(mx.video.VideoPlayer.RESIZING); } else { if (this._autoPlay) { clearInterval(this._finishAutoResizeIntervalID); this._finishAutoResizeIntervalID = setInterval(this, 'finishAutoResize', mx.video.VideoPlayer.FINISH_AUTO_RESIZE_INTERVAL); } else { this.finishAutoResize(); } } } } else { this.dispatchEvent({'type': 'resize', 'x': this._x, 'y': this._y, 'width': this._width, 'height': this._height}); } }; v2.finishAutoResize = function () { clearInterval(this._finishAutoResizeIntervalID); this._finishAutoResizeIntervalID = 0; if (this.__get__stateResponsive()) { return undefined; } this._visible = this.__visible; this._sound.setVolume(this._volume); this._hiddenForResize = false; this.dispatchEvent({'type': 'resize', 'x': this._x, 'y': this._y, 'width': this._width, 'height': this._height}); if (this._autoPlay) { if (this._ncMgr.isRTMP()) { if (!this._isLive) { this._currentPos = 0; this._play(0); } if (this._state == mx.video.VideoPlayer.RESIZING) { this.setState(mx.video.VideoPlayer.LOADING); this._cachedState = mx.video.VideoPlayer.PLAYING; } } else { this._pause(false); this._cachedState = mx.video.VideoPlayer.PLAYING; } } else { this.setState(mx.video.VideoPlayer.STOPPED); } }; v2._createStream = function () { this._ns = new NetStream(this._ncMgr.getNetConnection()); this._ns.mc = this; if (this._ncMgr.isRTMP()) { this._ns.onStatus = function (info) { this.mc.rtmpOnStatus(info); }; } else { this._ns.onStatus = function (info) { this.mc.httpOnStatus(info); }; } this._ns.onMetaData = function (info) { this.mc.onMetaData(info); }; this._ns.onCuePoint = function (info) { this.mc.onCuePoint(info); }; this._ns.setBufferTime(this._bufferTime); }; v2._setUpStream = function () { this._video.attachVideo(this._ns); this.attachAudio(this._ns); if (!isNaN(this._ncMgr.getStreamLength()) && this._ncMgr.getStreamLength() >= 0) { this._streamLength = this._ncMgr.getStreamLength(); } if (!isNaN(this._ncMgr.getStreamWidth()) && this._ncMgr.getStreamWidth() >= 0) { this._videoWidth = this._ncMgr.getStreamWidth(); } else { this._videoWidth = undefined; } if (!isNaN(this._ncMgr.getStreamHeight()) && this._ncMgr.getStreamHeight() >= 0) { this._videoHeight = this._ncMgr.getStreamHeight(); } else { this._videoHeight = undefined; } if ((this._autoSize || this._aspectRatio) && this._videoWidth != undefined && this._videoHeight != undefined) { this._prevVideoWidth = undefined; this._prevVideoHeight = undefined; this.doAutoResize(); } if (!this._autoSize && !this._aspectRatio || this._videoWidth != undefined && this._videoHeight != undefined) { if (this._autoPlay) { if (!this._ncMgr.isRTMP()) { this._cachedState = mx.video.VideoPlayer.BUFFERING; this._play(); } else { if (this._isLive) { this._cachedState = mx.video.VideoPlayer.BUFFERING; this._play(-1); } else { this._cachedState = mx.video.VideoPlayer.BUFFERING; this._play(0); } } } else { this._cachedState = mx.video.VideoPlayer.STOPPED; if (this._ncMgr.isRTMP()) { this._play(0, 0); } else { this._play(); this._pause(true); this._seek(0); } } } else { if (!this._hiddenForResize) { this.__visible = this._visible; this._visible = false; this._volume = this._sound.getVolume(); this._sound.setVolume(0); this._hiddenForResize = true; } this._hiddenForResizeMetadataDelay = 0; this._play(0); if (this._currentPos > 0) { this._seek(this._currentPos); this._currentPos = 0; } } clearInterval(this._autoResizeIntervalID); this._autoResizeIntervalID = setInterval(this, 'doAutoResize', mx.video.VideoPlayer.AUTO_RESIZE_INTERVAL); }; v2.doIdleTimeout = function () { clearInterval(this._idleTimeoutIntervalID); this._idleTimeoutIntervalID = 0; this.close(); }; v2.flushQueuedCmds = function () { while (this._cmdQueue.length > 0) { this._cmdQueue.pop(); } }; v2.execQueuedCmds = function () { for (;;) { if (!(this._cmdQueue.length > 0 && (this.__get__stateResponsive() || this._state == mx.video.VideoPlayer.CONNECTION_ERROR) && (this._cmdQueue[0].url != null && this._cmdQueue[0].url != undefined || this._state != mx.video.VideoPlayer.DISCONNECTED && this._state != mx.video.VideoPlayer.CONNECTION_ERROR))) break; var v2 = this._cmdQueue.shift(); this._cachedState = this._state; this._state = mx.video.VideoPlayer.EXEC_QUEUED_CMD; switch (v2.type) { case mx.video.VideoPlayer.PLAY: this.play(v2.url, v2.isLive, v2.time); break; case mx.video.VideoPlayer.LOAD: this.load(v2.url, v2.isLive, v2.time); break; case mx.video.VideoPlayer.PAUSE: this.pause(); break; case mx.video.VideoPlayer.STOP: this.stop(); break; case mx.video.VideoPlayer.SEEK: this.seek(v2.time); continue; } } }; v2.queueCmd = function (type, url, isLive, time) { this._cmdQueue.push({'type': type, 'url': url, 'isLive': false, 'time': time}); }; v1.version = '1.0.1.10'; v1.shortVersion = '1.0.1'; v1.DISCONNECTED = 'disconnected'; v1.STOPPED = 'stopped'; v1.PLAYING = 'playing'; v1.PAUSED = 'paused'; v1.BUFFERING = 'buffering'; v1.LOADING = 'loading'; v1.CONNECTION_ERROR = 'connectionError'; v1.REWINDING = 'rewinding'; v1.SEEKING = 'seeking'; v1.RESIZING = 'resizing'; v1.EXEC_QUEUED_CMD = 'execQueuedCmd'; v1.BUFFER_EMPTY = 'bufferEmpty'; v1.BUFFER_FULL = 'bufferFull'; v1.BUFFER_FLUSH = 'bufferFlush'; v1.DEFAULT_INCMANAGER = 'mx.video.NCManager'; v1.DEFAULT_UPDATE_TIME_INTERVAL = 250; v1.DEFAULT_UPDATE_PROGRESS_INTERVAL = 250; v1.DEFAULT_IDLE_TIMEOUT_INTERVAL = 300000; v1.AUTO_RESIZE_INTERVAL = 100; v1.AUTO_RESIZE_PLAYHEAD_TIMEOUT = 0.5; v1.AUTO_RESIZE_METADATA_DELAY_MAX = 5; v1.FINISH_AUTO_RESIZE_INTERVAL = 250; v1.RTMP_DO_STOP_AT_END_INTERVAL = 500; v1.RTMP_DO_SEEK_INTERVAL = 100; v1.HTTP_DO_SEEK_INTERVAL = 250; v1.HTTP_DO_SEEK_MAX_COUNT = 4; v1.CLOSE_NS_INTERVAL = 0.25; v1.HTTP_DELAYED_BUFFERING_INTERVAL = 100; v1.PLAY = 0; v1.LOAD = 1; v1.PAUSE = 2; v1.STOP = 3; v1.SEEK = 4; v2.addProperty('autoRewind', v2.__get__autoRewind, v2.__set__autoRewind); v2.addProperty('autoSize', v2.__get__autoSize, v2.__set__autoSize); v2.addProperty('bufferTime', v2.__get__bufferTime, v2.__set__bufferTime); v2.addProperty('bytesLoaded', v2.__get__bytesLoaded, function () {}); v2.addProperty('bytesTotal', v2.__get__bytesTotal, function () {}); v2.addProperty('height', v2.__get__height, v2.__set__height); v2.addProperty('idleTimeout', v2.__get__idleTimeout, v2.__set__idleTimeout); v2.addProperty('isLive', v2.__get__isLive, function () {}); v2.addProperty('isRTMP', v2.__get__isRTMP, function () {}); v2.addProperty('maintainAspectRatio', v2.__get__maintainAspectRatio, v2.__set__maintainAspectRatio); v2.addProperty('metadata', v2.__get__metadata, function () {}); v2.addProperty('ncMgr', v2.__get__ncMgr, function () {}); v2.addProperty('playheadTime', v2.__get__playheadTime, v2.__set__playheadTime); v2.addProperty('playheadUpdateInterval', v2.__get__playheadUpdateInterval, v2.__set__playheadUpdateInterval); v2.addProperty('progressInterval', v2.__get__progressInterval, v2.__set__progressInterval); v2.addProperty('scaleX', v2.__get__scaleX, v2.__set__scaleX); v2.addProperty('scaleY', v2.__get__scaleY, v2.__set__scaleY); v2.addProperty('state', v2.__get__state, function () {}); v2.addProperty('stateResponsive', v2.__get__stateResponsive, function () {}); v2.addProperty('totalTime', v2.__get__totalTime, function () {}); v2.addProperty('transform', v2.__get__transform, v2.__set__transform); v2.addProperty('url', v2.__get__url, function () {}); v2.addProperty('videoHeight', v2.__get__videoHeight, function () {}); v2.addProperty('videoWidth', v2.__get__videoWidth, function () {}); v2.addProperty('visible', v2.__get__visible, v2.__set__visible); v2.addProperty('volume', v2.__get__volume, v2.__set__volume); v2.addProperty('width', v2.__get__width, v2.__set__width); v2.addProperty('x', v2.__get__x, v2.__set__x); v2.addProperty('y', v2.__get__y, v2.__set__y); ASSetPropFlags(mx.video.VideoPlayer.prototype, null, 1); } #endinitclip } movieClip 11 __Packages.mx.video.INCManager { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.INCManager) { _global.mx.video.INCManager = function () {}; } #endinitclip } movieClip 12 __Packages.mx.events.EventDispatcher { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.events) { _global.mx.events = new Object(); } if (!_global.mx.events.EventDispatcher) { var v1 = function () {}; mx.events.EventDispatcher = v1; var v2 = v1.prototype; v1._removeEventListener = function (queue, event, handler) { if (queue != undefined) { var v4 = queue.length; var v1; v1 = 0; while (v1 < v4) { var v2 = queue[v1]; if (v2 == handler) { queue.splice(v1, 1); return undefined; } ++v1; } } }; v1.initialize = function (object) { if (mx.events.EventDispatcher._fEventDispatcher == undefined) { mx.events.EventDispatcher._fEventDispatcher = new mx.events.EventDispatcher(); } object.addEventListener = mx.events.EventDispatcher._fEventDispatcher.addEventListener; object.removeEventListener = mx.events.EventDispatcher._fEventDispatcher.removeEventListener; object.dispatchEvent = mx.events.EventDispatcher._fEventDispatcher.dispatchEvent; object.dispatchQueue = mx.events.EventDispatcher._fEventDispatcher.dispatchQueue; }; v2.dispatchQueue = function (queueObj, eventObj) { var v7 = '__q_' + eventObj.type; var v4 = queueObj[v7]; if (v4 != undefined) { var v5; for (v5 in v4) { var v1 = v4[v5]; var v3 = typeof v1; if (v3 == 'object' || v3 == 'movieclip') { if (v1.handleEvent != undefined) { v1.handleEvent(eventObj); } if (v1[eventObj.type] != undefined) { if (mx.events.EventDispatcher.exceptions[eventObj.type] == undefined) { v1[eventObj.type](eventObj); } } } else { v1.apply(queueObj, [eventObj]); } } } }; v2.dispatchEvent = function (eventObj) { if (eventObj.target == undefined) { eventObj.target = this; } this[eventObj.type + 'Handler'](eventObj); this.dispatchQueue(this, eventObj); }; v2.addEventListener = function (event, handler) { var v3 = '__q_' + event; if (this[v3] == undefined) { this[v3] = new Array(); } _global.ASSetPropFlags(this, v3, 1); mx.events.EventDispatcher._removeEventListener(this[v3], event, handler); this[v3].push(handler); }; v2.removeEventListener = function (event, handler) { var v2 = '__q_' + event; mx.events.EventDispatcher._removeEventListener(this[v2], event, handler); }; v1._fEventDispatcher = undefined; v1.exceptions = {'move': 1, 'draw': 1, 'load': 1}; ASSetPropFlags(mx.events.EventDispatcher.prototype, null, 1); } #endinitclip } movieClip 13 __Packages.mx.video.VideoError { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.VideoError) { var v1 = function (errCode, msg) { super(); this._code = errCode; this.message = '' + errCode + ': ' + mx.video.VideoError.ERROR_MSG[errCode - mx.video.VideoError.BASE_ERROR_CODE] + ((msg == undefined) ? '' : ': ' + msg); this.name = 'VideoError'; }; mx.video.VideoError = v1; mx.video.VideoError extends Error; var v2 = v1.prototype; v2.__get__code = function () { return this._code; }; v1.version = '1.0.1.10'; v1.shortVersion = '1.0.1'; v1.BASE_ERROR_CODE = 1000; v1.NO_CONNECTION = 1000; v1.NO_CUE_POINT_MATCH = 1001; v1.ILLEGAL_CUE_POINT = 1002; v1.INVALID_SEEK = 1003; v1.INVALID_CONTENT_PATH = 1004; v1.INVALID_XML = 1005; v1.NO_BITRATE_MATCH = 1006; v1.DELETE_DEFAULT_PLAYER = 1007; v1.ERROR_MSG = ['Unable to make connection to server or to find FLV on server', 'No matching cue point found', 'Illegal cue point', 'Invalid seek', 'Invalid contentPath', 'Invalid xml', 'No bitrate match, must be no default flv', 'Cannot delete default VideoPlayer']; v2.addProperty('code', v2.__get__code, function () {}); ASSetPropFlags(mx.video.VideoError.prototype, null, 1); } #endinitclip } movieClip 18 __Packages.mx.video.NCManager { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.NCManager) { var v1 = function () { this.initNCInfo(); this.initOtherInfo(); this._timeoutIntervalId = 0; this._tryNCIntervalId = 0; this._timeout = this.DEFAULT_TIMEOUT; this._nc = undefined; this._ncConnected = false; }; mx.video.NCManager = v1; var v2 = v1.prototype; _global.mx.video.NCManager implements _global.mx.video.INCManager; v2.initNCInfo = function () { this._isRTMP = undefined; this._serverName = undefined; this._wrappedURL = undefined; this._portNumber = undefined; this._appName = undefined; }; v2.initOtherInfo = function () { this._contentPath = undefined; this._streamName = undefined; this._streamLength = undefined; this._streamWidth = undefined; this._streamHeight = undefined; this._streams = undefined; this._autoSenseBW = false; this.fpadZone = undefined; this._payload = 0; this._connTypeCounter = 0; this.cleanConns(); }; v2.getTimeout = function () { return this._timeout; }; v2.setTimeout = function (t) { this._timeout = t; if (this._timeoutIntervalId != 0) { clearInterval(this._timeoutIntervalId); this._timeoutIntervalId = setInterval(this, '_onFCSConnectTimeOut', this._timeout); } }; v2.getBitrate = function () { return this._bitrate; }; v2.setBitrate = function (b) { if (this._isRTMP == undefined || !this._isRTMP) { this._bitrate = b; } }; v2.getVideoPlayer = function () { return this._owner; }; v2.setVideoPlayer = function (v) { this._owner = v; }; v2.getNetConnection = function () { return this._nc; }; v2.getStreamName = function () { return this._streamName; }; v2.isRTMP = function () { return this._isRTMP; }; v2.getStreamLength = function () { return this._streamLength; }; v2.getStreamWidth = function () { return this._streamWidth; }; v2.getStreamHeight = function () { return this._streamHeight; }; v2.connectToURL = function (url) { this.initOtherInfo(); this._contentPath = url; if (this._contentPath == null || this._contentPath == undefined || this._contentPath == '') { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH); } var v2 = this.parseURL(this._contentPath); if (v2.streamName == undefined || v2.streamName == '') { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url); } if (v2.isRTMP) { var v3 = this.canReuseOldConnection(v2); this._isRTMP = true; this._protocol = v2.protocol; this._streamName = v2.streamName; this._serverName = v2.serverName; this._wrappedURL = v2.wrappedURL; this._portNumber = v2.portNumber; this._appName = v2.appName; if (this._appName == undefined || this._appName == '' || this._streamName == undefined || this._streamName == '') { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url); } this._autoSenseBW = this._streamName.indexOf(',') >= 0; return v3 || this.connectRTMP(); } else { if (v2.streamName.indexOf('?') < 0 && (v2.streamName.slice(-4)).toLowerCase() == '.flv') { var v3 = this.canReuseOldConnection(v2); this._isRTMP = false; this._streamName = v2.streamName; return v3 || this.connectHTTP(); } if (v2.streamName.indexOf('/fms/fpad') >= 0) { try { return this.connectFPAD(v2.streamName); } catch (v0) { if (Error(v0) != null) { var err = Error(v0); this._smilMgr = new mx.video.SMILManager(this); return this._smilMgr.connectXML(v2.streamName); } throw v0; } } this._smilMgr = new mx.video.SMILManager(this); return this._smilMgr.connectXML(v2.streamName); } }; v2.connectAgain = function () { var v2 = this._appName.indexOf('/'); if (v2 < 0) { v2 = this._streamName.indexOf('/'); if (v2 >= 0) { this._appName += '/'; this._appName += this._streamName.slice(0, v2); this._streamName = this._streamName.slice(v2 + 1); } return false; } var v3 = this._appName.slice(v2 + 1); v3 += '/'; v3 += this._streamName; this._streamName = v3; this._appName = this._appName.slice(0, v2); this.close(); this._payload = 0; this._connTypeCounter = 0; this.cleanConns(); this.connectRTMP(); return true; }; v2.reconnect = function () { if (!this._isRTMP) { throw new Error('Cannot call reconnect on an http connection'); } this._nc.onStatus = function (info) { this.mc.reconnectOnStatus(this, info); }; this._nc.onBWDone = function () { this.mc.onReconnected(); }; this._nc.connect(this._ncUri, false); }; v2.onReconnected = function () { delete this._nc.onStatus; delete this._nc.onBWDone; this._ncConnected = true; this._owner.ncReconnected(); }; v2.close = function () { if (this._nc) { this._nc.close(); this._ncConnected = false; } }; v2.helperDone = function (helper, success) { if (!success) { this._nc = undefined; this._ncConnected = false; this._owner.ncConnected(); this._smilMgr = undefined; this._fpadMgr = undefined; return undefined; } var v2; var v4; if (helper == this._fpadMgr) { v4 = this._fpadMgr.rtmpURL; this._fpadMgr = undefined; v2 = this.parseURL(v4); this._isRTMP = v2.isRTMP; this._protocol = v2.protocol; this._serverName = v2.serverName; this._portNumber = v2.portNumber; this._wrappedURL = v2.wrappedURL; this._appName = v2.appName; this._streamName = v2.streamName; var v5 = this.fpadZone; this.fpadZone = -1; this.connectRTMP(); this.fpadZone = v5; return undefined; } if (helper != this._smilMgr) { return undefined; } this._streamWidth = this._smilMgr.width; this._streamHeight = this._smilMgr.height; v4 = this._smilMgr.baseURLAttr[0]; if (v4 != undefined && v4 != '') { if (v4.charAt(v4.length - 1) != '/') { v4 += '/'; } v2 = this.parseURL(v4); this._isRTMP = v2.isRTMP; this._streamName = v2.streamName; if (this._isRTMP) { this._protocol = v2.protocol; this._serverName = v2.serverName; this._portNumber = v2.portNumber; this._wrappedURL = v2.wrappedURL; this._appName = v2.appName; if (this._appName == undefined || this._appName == '') { this._smilMgr = undefined; throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Base RTMP URL must include application name: ' + v4); } if (this._smilMgr.baseURLAttr.length > 1) { v2 = this.parseURL(this._smilMgr.baseURLAttr[1]); if (v2.serverName != undefined) { this.fallbackServerName = v2.serverName; } } } } this._streams = this._smilMgr.videoTags; this._smilMgr = undefined; var v3 = 0; while (v3 < this._streams.length) { v4 = this._streams[v3].src; v2 = this.parseURL(v4); if (this._isRTMP == undefined) { this._isRTMP = v2.isRTMP; if (this._isRTMP) { this._protocol = v2.protocol; if (this._streams.length > 1) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Cannot switch between multiple absolute RTMP URLs, must use meta tag base attribute.'); } this._serverName = v2.serverName; this._portNumber = v2.portNumber; this._wrappedURL = v2.wrappedURL; this._appName = v2.appName; if (this._appName == undefined || this._appName == '') { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Base RTMP URL must include application name: ' + v4); } } else { if (v2.streamName.indexOf('/fms/fpad') >= 0 && this._streams.length > 1) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Cannot switch between multiple absolute fpad URLs, must use meta tag base attribute.'); } } } else { if (this._streamName != undefined && this._streamName != '' && !v2.isRelative && this._streams.length > 1) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'When using meta tag base attribute, cannot use absolute URLs for video or ref tag src attributes.'); } } this._streams[v3].parseResults = v2; ++v3; } this._autoSenseBW = this._streams.length > 1; if (!this._autoSenseBW) { if (this._streamName != undefined) { this._streamName += this._streams[0].parseResults.streamName; } else { this._streamName = this._streams[0].parseResults.streamName; } this._streamLength = this._streams[0].dur; } if (this._isRTMP) { this.connectRTMP(); } else { if (this._streamName != undefined && this._streamName.indexOf('/fms/fpad') >= 0) { this.connectFPAD(this._streamName); } else { if (this._autoSenseBW) { this.bitrateMatch(); } this.connectHTTP(); this._owner.ncConnected(); } } }; v2.bitrateMatch = function () { var v3; var v4 = this._bitrate; if (isNaN(v4)) { v4 = 0; } var v2 = 0; while (v2 < this._streams.length) { if (isNaN(this._streams[v2].bitrate) || v4 >= this._streams[v2].bitrate) { v3 = v2; break; } ++v2; } if (isNaN(v3)) { throw new mx.video.VideoError(mx.video.VideoError.NO_BITRATE_MATCH); } if (this._streamName != undefined) { this._streamName += this._streams[v3].src; } else { this._streamName = this._streams[v3].src; } this._streamLength = this._streams[v3].dur; }; v2.parseURL = function (url) { var v2 = new Object(); var v3 = 0; var v4 = url.indexOf(':/', v3); if (v4 >= 0) { v4 += 2; v2.protocol = url.slice(v3, v4); v2.isRelative = false; } else { v2.isRelative = true; } if (v2.protocol != undefined && (v2.protocol == 'rtmp:/' || v2.protocol == 'rtmpt:/' || v2.protocol == 'rtmps:/')) { v2.isRTMP = true; v3 = v4; if (url.charAt(v3) == '/') { ++v3; var v7 = url.indexOf(':', v3); var v8 = url.indexOf('/', v3); if (v8 < 0) { if (v7 < 0) { v2.serverName = url.slice(v3); } else { v4 = v7; v2.portNumber = url.slice(v3, v4); v3 = v4 + 1; v2.serverName = url.slice(v3); } return v2; } if (v7 >= 0 && v7 < v8) { v4 = v7; v2.serverName = url.slice(v3, v4); v3 = v4 + 1; v4 = v8; v2.portNumber = url.slice(v3, v4); } else { v4 = v8; v2.serverName = url.slice(v3, v4); } v3 = v4 + 1; } if (url.charAt(v3) == '?') { var v9 = url.slice(v3 + 1); var v6 = this.parseURL(v9); if (v6.protocol == undefined || !v6.isRTMP) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url); } v2.wrappedURL = '?'; v2.wrappedURL += v6.protocol; if (v6.serverName != undefined) { v2.wrappedURL += '/'; v2.wrappedURL += v6.serverName; } if (v6.wrappedURL != undefined) { v2.wrappedURL += '/?'; v2.wrappedURL += v6.wrappedURL; } v2.appName = v6.appName; v2.streamName = v6.streamName; return v2; } v4 = url.indexOf('/', v3); if (v4 < 0) { v2.appName = url.slice(v3); return v2; } v2.appName = url.slice(v3, v4); v3 = v4 + 1; v4 = url.indexOf('/', v3); if (v4 < 0) { v2.streamName = url.slice(v3); if ((v2.streamName.slice(-4)).toLowerCase() == '.flv') { v2.streamName = v2.streamName.slice(0, -4); } return v2; } v2.appName += '/'; v2.appName += url.slice(v3, v4); v3 = v4 + 1; v2.streamName = url.slice(v3); if ((v2.streamName.slice(-4)).toLowerCase() == '.flv') { v2.streamName = v2.streamName.slice(0, -4); } return v2; } v2.isRTMP = false; v2.streamName = url; return v2; }; v2.canReuseOldConnection = function (parseResults) { if (this._nc == undefined || this._nc == null || !this._ncConnected) { return false; } if (!parseResults.isRTMP) { if (!this._isRTMP) { return true; } this._owner.close(); this._nc = undefined; this._ncConnected = false; this.initNCInfo(); return false; } if (this._isRTMP) { if (parseResults.serverName == this._serverName && parseResults.appName == this._appName && parseResults.protocol == this._protocol && parseResults.portNumber == this._portNumber && parseResults.wrappedURL == this._wrappedURL) { return true; } this._owner.close(); this._nc = undefined; this._ncConnected = false; } this.initNCInfo(); return false; }; v2.connectHTTP = function () { this._nc = new NetConnection(); this._nc.connect(null); this._ncConnected = true; return true; }; v2.connectRTMP = function () { clearInterval(this._timeoutIntervalId); this._timeoutIntervalId = setInterval(this, '_onFCSConnectTimeOut', this._timeout); this._tryNC = new Array(); var v2 = 0; while (v2 < mx.video.NCManager.RTMP_CONN.length) { this._tryNC[v2] = new NetConnection(); if (this.fpadZone != undefined && this.fpadZone != null) { this._tryNC[v2].fpadZone = this.fpadZone; } this._tryNC[v2].mc = this; this._tryNC[v2].pending = false; this._tryNC[v2].connIndex = v2; this._tryNC[v2].onBWDone = function (p_bw) { this.mc.onConnected(this, p_bw); }; this._tryNC[v2].onBWCheck = function () { return ++this.mc._payload; }; this._tryNC[v2].onStatus = function (info) { this.mc.connectOnStatus(this, info); }; ++v2; } this.nextConnect(); return false; }; v2.connectFPAD = function (url) { var v7; var v5; var v6; var v2 = url.indexOf('?'); while (v2 >= 0) { ++v2; var v4 = url.indexOf('&', v2); if ((url.substr(v2, 4)).toLowerCase() == 'uri=') { v7 = url.slice(0, v2); v2 += 4; if (v4 >= 0) { v5 = url.slice(v2, v4); v6 = url.slice(v4); } else { v5 = url.slice(v2); v6 = ''; } break; } else { v2 = v4; } } if (v2 < 0) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, 'fpad url must include uri parameter: ' + url); } var v8 = this.parseURL(v5); if (!v8.isRTMP) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, 'fpad url uri parameter must be rtmp url: ' + url); } this._fpadMgr = new mx.video.FPADManager(this); return this._fpadMgr.connectXML(v7, v5, v6, v8); }; v2.nextConnect = function () { clearInterval(this._tryNCIntervalId); this._tryNCIntervalId = 0; var v4; var v3; if (this._connTypeCounter == 0) { v4 = this._protocol; if (this._portNumber != undefined) { v3 = this._portNumber; } else { var v2 = 0; while (v2 < mx.video.NCManager.RTMP_CONN.length) { if (v4 == mx.video.NCManager.RTMP_CONN[v2].protocol) { v3 = mx.video.NCManager.RTMP_CONN[v2].port; break; } ++v2; } } } else { v4 = mx.video.NCManager.RTMP_CONN[this._connTypeCounter].protocol; v3 = mx.video.NCManager.RTMP_CONN[this._connTypeCounter].port; } var v5 = v4 + ((this._serverName == undefined) ? '' : '/' + this._serverName + ':' + v3 + '/') + ((this._wrappedURL == undefined) ? '' : this._wrappedURL + '/') + this._appName; this._tryNC[this._connTypeCounter].pending = true; this._tryNC[this._connTypeCounter].connect(v5, this._autoSenseBW); if (this._connTypeCounter < mx.video.NCManager.RTMP_CONN.length - 1) { ++this._connTypeCounter; this._tryNCIntervalId = setInterval(this, 'nextConnect', 1500); } }; v2.cleanConns = function () { clearInterval(this._tryNCIntervalId); this._tryNCIntervalId = 0; if (this._tryNC != undefined) { var v2 = 0; while (v2 < this._tryNC.length) { if (this._tryNC[v2] != undefined) { delete this._tryNC[v2].onStatus; if (this._tryNC[v2].pending) { this._tryNC[v2].onStatus = function (info) { this.mc.disconnectOnStatus(this, info); }; } else { delete this._tryNC[v2].onStatus; this._tryNC[v2].close(); } } delete this._tryNC[v2]; ++v2; } delete this._tryNC; } }; v2.tryFallBack = function () { if (this._serverName == this.fallbackServerName || this.fallbackServerName == undefined || this.fallbackServerName == null) { delete this._nc; this._nc = undefined; this._ncConnected = false; this._owner.ncConnected(); } else { this._connTypeCounter = 0; this.cleanConns(); this._serverName = this.fallbackServerName; this.connectRTMP(); } }; v2.onConnected = function (p_nc, p_bw) { clearInterval(this._timeoutIntervalId); this._timeoutIntervalId = 0; delete p_nc.onBWDone; delete p_nc.onBWCheck; delete p_nc.onStatus; this._nc = p_nc; this._ncUri = this._nc.uri; this._ncConnected = true; if (this._autoSenseBW) { this._bitrate = p_bw * 1024; if (this._streams != undefined) { this.bitrateMatch(); } else { var v3 = this._streamName.split(','); var v2 = 0; while (v2 < v3.length) { var v4 = mx.video.NCManager.stripFrontAndBackWhiteSpace(v3[v2]); if (v2 + 1 < v3.length) { if (p_bw <= Number(v3[v2 + 1])) { this._streamName = v4; break; } } else { this._streamName = v4; break; } v2 += 2; } if ((this._streamName.slice(-4)).toLowerCase() == '.flv') { this._streamName = this._streamName.slice(0, -4); } } } if (!this._owner.__get__isLive() && this._streamLength == undefined) { var v6 = new Object(); v6.mc = this; v6.onResult = function (length) { this.mc.getStreamLengthResult(length); }; this._nc.call('getStreamLength', v6, this._streamName); } else { this._owner.ncConnected(); } }; v2.connectOnStatus = function (target, info) { target.pending = false; if (info.code == 'NetConnection.Connect.Success') { this._nc = this._tryNC[target.connIndex]; this._tryNC[target.connIndex] = undefined; this.cleanConns(); } else { if ((info.code == 'NetConnection.Connect.Failed' || info.code == 'NetConnection.Connect.Rejected') && target.connIndex == mx.video.NCManager.RTMP_CONN.length - 1) { if (!this.connectAgain()) { this.tryFallBack(); } } else {} } }; v2.reconnectOnStatus = function (target, info) { if (info.code == 'NetConnection.Connect.Failed' || info.code == 'NetConnection.Connect.Rejected') { delete this._nc; this._nc = undefined; this._ncConnected = false; this._owner.ncReconnected(); } }; v2.disconnectOnStatus = function (target, info) { if (info.code == 'NetConnection.Connect.Success') { delete target.onStatus; target.close(); } }; v2.getStreamLengthResult = function (length) { if (length > 0) { this._streamLength = length; } this._owner.ncConnected(); }; v2._onFCSConnectTimeOut = function () { this.cleanConns(); this._nc = undefined; this._ncConnected = false; if (!this.connectAgain()) { this._owner.ncConnected(); } }; v1.stripFrontAndBackWhiteSpace = function (p_str) { var v1; var v2 = p_str.length; var v4 = 0; var v5 = v2; v1 = 0; while (v1 < v2) { switch (p_str.charCodeAt(v1)) { if (p_str.charCodeAt(v1) !== 32) { } else { case 9: case 10: case 13: break; } default: v4 = v1; break; } ++v1; } v1 = v2; while (v1 >= 0) { switch (p_str.charCodeAt(v1)) { if (p_str.charCodeAt(v1) !== 32) { } else { case 9: case 10: break; case 13: } default: v5 = v1 + 1; break; } --v1; } if (v5 <= v4) { return ''; } return p_str.slice(v4, v5); }; v1.version = '1.0.1.10'; v1.shortVersion = '1.0.1'; v2.DEFAULT_TIMEOUT = 60000; v1.RTMP_CONN = [{'protocol': 'rtmp:/', 'port': '1935'}, {'protocol': 'rtmp:/', 'port': '443'}, {'protocol': 'rtmpt:/', 'port': '80'}, {'protocol': 'rtmps:/', 'port': '443'}]; ASSetPropFlags(mx.video.NCManager.prototype, null, 1); } #endinitclip } movieClip 16 __Packages.mx.video.SMILManager { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.SMILManager) { var v1 = function (owner) { this._owner = owner; }; mx.video.SMILManager = v1; var v2 = v1.prototype; v2.connectXML = function (url) { this._url = this.fixURL(url); this.xml = new XML(); this.xml.onLoad = mx.utils.Delegate.create(this, this.xmlOnLoad); this.xml.load(this._url); return false; }; v2.fixURL = function (origURL) { if ((origURL.substr(0, 5)).toLowerCase() == 'http:' || (origURL.substr(0, 6)).toLowerCase() == 'https:') { var v2 = origURL.indexOf('?') >= 0 ? '&' : '?'; return origURL + v2 + 'FLVPlaybackVersion=' + mx.video.SMILManager.shortVersion; } return origURL; }; v2.xmlOnLoad = function (success) { try { if (!success) { this._owner.helperDone(this, false); } else { this.baseURLAttr = new Array(); this.videoTags = new Array(); var v2 = this.xml.firstChild; var v6 = false; while (v2 != null) { if (v2.nodeType == mx.video.SMILManager.ELEMENT_NODE) { v6 = true; if (v2.nodeName.toLowerCase() == 'smil') { break; } } v2 = v2.nextSibling; } if (!v6) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" No root node found; if url is for an flv it must have .flv extension and take no parameters'); } else { if (v2 == null) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Root node not smil'); } } var v5 = false; var v4 = 0; while (v4 < v2.childNodes.length) { var v3 = v2.childNodes[v4]; if (v3.nodeType != mx.video.SMILManager.ELEMENT_NODE) { } else { if (v3.nodeName.toLowerCase() == 'head') { this.parseHead(v3); } else { if (v3.nodeName.toLowerCase() == 'body') { v5 = true; this.parseBody(v3); } else { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag ' + v3.nodeName + ' not supported in ' + v2.nodeName + ' tag.'); } } } ++v4; } if (!v5) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag body is required.'); } this._owner.helperDone(this, true); } } catch (v0) { if (Error(v0) != null) { var err = Error(v0); this._owner.helperDone(this, false); throw err; } else { throw v0; } } }; v2.parseHead = function (parentNode) { var v4 = false; var v3 = 0; while (v3 < parentNode.childNodes.length) { var v2 = parentNode.childNodes[v3]; if (v2.nodeType != mx.video.SMILManager.ELEMENT_NODE) { } else { if (v2.nodeName.toLowerCase() == 'meta') { for (var v6 in v2.attributes) { if (v6.toLowerCase() == 'base') { this.baseURLAttr.push(v2.attributes[v6]); } else { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Attribute ' + v6 + ' not supported in ' + v2.nodeName + ' tag.'); } } } else { if (v2.nodeName.toLowerCase() == 'layout') { if (!v4) { this.parseLayout(v2); v4 = true; } else {} } else {} } } ++v3; } }; v2.parseLayout = function (parentNode) { var v3 = 0; while (v3 < parentNode.childNodes.length) { var v2 = parentNode.childNodes[v3]; if (v2.nodeType != mx.video.SMILManager.ELEMENT_NODE) { } else { if (v2.nodeName.toLowerCase() == 'root-layout') { for (var v5 in v2.attributes) { if (v5.toLowerCase() == 'width') { this.width = Number(v2.attributes[v5]); } else { if (v5.toLowerCase() == 'height') { this.height = Number(v2.attributes[v5]); } else {} } } if (isNaN(this.width) || this.width < 0 || isNaN(this.height) || this.height < 0) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag ' + v2.nodeName + ' requires attributes id, width and height. Width and height must be numbers greater than or equal to 0.'); } this.width = Math.round(this.width); this.height = Math.round(this.height); return undefined; } else {} } ++v3; } }; v2.parseBody = function (parentNode) { var v6 = 0; var v3 = 0; while (v3 < parentNode.childNodes.length) { var v2 = parentNode.childNodes[v3]; if (v2.nodeType != mx.video.SMILManager.ELEMENT_NODE) { } else { if (++v6 > 1) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Tag ' + parentNode.nodeName + ' is required to contain exactly one tag.'); } if (v2.nodeName.toLowerCase() == 'switch') { this.parseSwitch(v2); } else { if (v2.nodeName.toLowerCase() == 'video' || v2.nodeName.toLowerCase() == 'ref') { var v5 = this.parseVideo(v2); this.videoTags.push(v5); } else {} } } ++v3; } if (this.videoTags.length < 1) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" At least one video of ref tag is required.'); } }; v2.parseSwitch = function (parentNode) { var v4 = 0; while (v4 < parentNode.childNodes.length) { var v5 = parentNode.childNodes[v4]; if (v5.nodeType != mx.video.SMILManager.ELEMENT_NODE) { } else { if (v5.nodeName.toLowerCase() == 'video' || v5.nodeName.toLowerCase() == 'ref') { var v3 = this.parseVideo(v5); if (v3.bitrate == undefined) { this.videoTags.push(v3); } else { var v6 = false; var v2 = 0; while (v2 < this.videoTags.length) { if (this.videoTags[v2].bitrate == undefined || v3.bitrate < this.videoTags[v4].bitrate) { v6 = true; this.videoTags.splice(v2, 0, this.videoTags); break; } ++v2; } if (!v6) { this.videoTags.push(v3); } } } else {} } ++v4; } }; v2.parseVideo = function (node) { var v3 = new Object(); for (var v4 in node.attributes) { if (v4.toLowerCase() == 'src') { v3.src = node.attributes[v4]; } else { if (v4.toLowerCase() == 'system-bitrate') { v3.bitrate = Number(node.attributes[v4]); } else { if (v4.toLowerCase() == 'dur') { v3.dur = this.parseTime(node.attributes[v4]); } else {} } } } if (v3.src == undefined) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Attribute src is required in ' + node.nodeName + ' tag.'); } return v3; }; v2.parseTime = function (timeStr) { var v4 = 0; var v3 = timeStr.split(':'); if (v3.length < 1 || v3.length > 3) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Invalid dur value: ' + timeStr); } var v1 = 0; while (v1 < v3.length) { var v2 = Number(v3[v1]); if (isNaN(v2)) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'Invalid dur value: ' + timeStr); } v4 *= 60; v4 += v2; ++v1; } return v4; }; v1.version = '1.0.1.10'; v1.shortVersion = '1.0.1'; v1.ELEMENT_NODE = 1; ASSetPropFlags(mx.video.SMILManager.prototype, null, 1); } #endinitclip } movieClip 15 __Packages.mx.utils.Delegate { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.utils) { _global.mx.utils = new Object(); } if (!_global.mx.utils.Delegate) { var v1 = function (f) { super(); this.func = f; }; mx.utils.Delegate = v1; mx.utils.Delegate extends Object; var v2 = v1.prototype; v1.create = function (obj, func) { var v2 = function () { var v2 = arguments.callee.target; var v3 = arguments.callee.func; return v3.apply(v2, arguments); }; v2.target = obj; v2.func = func; return v2; }; v2.createDelegate = function (obj) { return mx.utils.Delegate.create(obj, this.func); }; ASSetPropFlags(mx.utils.Delegate.prototype, null, 1); } #endinitclip } movieClip 17 __Packages.mx.video.FPADManager { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.FPADManager) { var v1 = function (owner) { this._owner = owner; }; mx.video.FPADManager = v1; var v2 = v1.prototype; v2.connectXML = function (urlPrefix, uriParam, urlSuffix, uriParamParseResults) { this._uriParam = uriParam; this._parseResults = uriParamParseResults; this._url = urlPrefix + 'uri=' + this._parseResults.protocol; if (this._parseResults.serverName != undefined) { this._url += '/' + this._parseResults.serverName; } if (this._parseResults.portNumber != undefined) { this._url += ':' + this._parseResults.portNumber; } if (this._parseResults.wrappedURL != undefined) { this._url += '/?' + this._parseResults.wrappedURL; } this._url += '/' + this._parseResults.appName; this._url += urlSuffix; this.xml = new XML(); this.xml.onLoad = mx.utils.Delegate.create(this, this.xmlOnLoad); this.xml.load(this._url); return false; }; v2.xmlOnLoad = function (success) { try { if (!success) { this._owner.helperDone(this, false); } else { var v5 = this.xml.firstChild; var v8 = false; while (v5 != null) { if (v5.nodeType == mx.video.FPADManager.ELEMENT_NODE) { v8 = true; if (v5.nodeName.toLowerCase() == 'fpad') { break; } } v5 = v5.nextSibling; } if (!v8) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" No root node found; if url is for an flv it must have .flv extension and take no parameters'); } else { if (v5 == null) { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" Root node not fpad'); } } var v7; var v6 = 0; while (v6 < v5.childNodes.length) { var v3 = v5.childNodes[v6]; if (v3.nodeType != mx.video.FPADManager.ELEMENT_NODE) { } else { if (v3.nodeName.toLowerCase() == 'proxy') { var v2 = 0; while (v2 < v3.childNodes.length) { var v4 = v3.childNodes[v2]; if (v4.nodeType == mx.video.FPADManager.TEXT_NODE) { v7 = this.trim(v4.nodeValue); break; } ++v2; } break; } } ++v6; } if (v7 == undefined || v7 == '') { throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, 'URL: "' + this._url + '" fpad xml requires proxy tag.'); } this.rtmpURL = this._parseResults.protocol + '/' + v7 + '/?' + this._uriParam; this._owner.helperDone(this, true); } } catch (v0) { if (Error(v0) != null) { var err = Error(v0); this._owner.helperDone(this, false); throw err; } else { throw v0; } } }; v2.trim = function (str) { var v2 = 0; while (v2 < str.length) { var v1 = str.charAt(v2); if (v1 != ' ' && v1 != '\t' && v1 != '\r' && v1 != '\n') { break; } ++v2; } if (v2 >= str.length) { return ''; } var v4 = str.length - 1; while (v4 > v2) { v1 = str.charAt(v4); if (v1 != ' ' && v1 != '\t' && v1 != '\r' && v1 != '\n') { break; } --v4; } return str.slice(v2, v4 + 1); }; v1.version = '1.0.1.10'; v1.shortVersion = '1.0.1'; v1.ELEMENT_NODE = 1; v1.TEXT_NODE = 3; ASSetPropFlags(mx.video.FPADManager.prototype, null, 1); } #endinitclip } movieClip 19 __Packages.mx.video.CuePointManager { #initclip if (!_global.mx) { _global.mx = new Object(); } if (!_global.mx.video) { _global.mx.video = new Object(); } if (!_global.mx.video.CuePointManager) { var v1 = function (owner, id) { this._owner = owner; this._id = id; this.reset(); this._asCuePointTolerance = (this._owner.getVideoPlayer(this._id)).__get__playheadUpdateInterval() / 2000; this._linearSearchTolerance = mx.video.CuePointManager.DEFAULT_LINEAR_SEARCH_TOLERANCE; }; mx.video.CuePointManager = v1; var v2 = v1.prototype; v2.reset = function () { this._metadataLoaded = false; this.allCuePoints = null; this.asCuePoints = null; this._disabledCuePoints = null; this.flvCuePoints = null; this.navCuePoints = null; this.eventCuePoints = null; this._asCuePointIndex = 0; }; v2.__get__metadataLoaded = function () { return this._metadataLoaded; }; v2.__set__playheadUpdateInterval = function (aTime) { this._asCuePointTolerance = aTime / 2000; return this.__get__playheadUpdateInterval(); }; v2.__get__id = function () { return this._id; }; v2.addASCuePoint = function (timeOrCuePoint, name, parameters) { var v3; if (typeof timeOrCuePoint == 'object') { v3 = mx.video.CuePointManager.deepCopyObject(timeOrCuePoint); } else { v3 = {'time': timeOrCuePoint, 'name': name, 'parameters': mx.video.CuePointManager.deepCopyObject(parameters)}; } var v7 = isNaN(v3.time) || v3.time < 0; if (v7) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number'); } var v6 = v3.name == undefined || v3.name == null; if (v6) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'name cannot be undefined or null'); } var v2; v3.type = 'actionscript'; if (this.asCuePoints == null || this.asCuePoints == undefined || this.asCuePoints.length < 1) { v2 = 0; this.asCuePoints = new Array(); this.asCuePoints.push(v3); } else { v2 = this.getCuePointIndex(this.asCuePoints, true, v3.time); v2 = this.asCuePoints[v2].time > v3.time ? 0 : v2 + 1; this.asCuePoints.splice(v2, 0, v3); } if (this.allCuePoints == null || this.allCuePoints == undefined || this.allCuePoints.length < 1) { v2 = 0; this.allCuePoints = new Array(); this.allCuePoints.push(v3); } else { v2 = this.getCuePointIndex(this.allCuePoints, true, v3.time); v2 = this.allCuePoints[v2].time > v3.time ? 0 : v2 + 1; this.allCuePoints.splice(v2, 0, v3); } var v5 = (this._owner.getVideoPlayer(this._id)).__get__playheadTime(); if (v5 > 0) { if (this._asCuePointIndex == v2) { if (v5 > this.asCuePoints[v2].time) { ++this._asCuePointIndex; } } else { if (this._asCuePointIndex > v2) { ++this._asCuePointIndex; } } var v4 = mx.video.CuePointManager.deepCopyObject(this.asCuePoints[v2]); v4.array = this.asCuePoints; v4.index = v2; return v4; } this._asCuePointIndex = 0; var v4 = mx.video.CuePointManager.deepCopyObject(this.asCuePoints[v2]); v4.array = this.asCuePoints; v4.index = v2; return v4; }; v2.removeASCuePoint = function (timeNameOrCuePoint) { if (this.asCuePoints == null || this.asCuePoints == undefined || this.asCuePoints.length < 1) { return null; } var v3; switch (typeof timeNameOrCuePoint) { case 'string': v3 = {'name': timeNameOrCuePoint}; break; case 'number': v3 = {'time': timeNameOrCuePoint}; break; case 'object': v3 = timeNameOrCuePoint; } var v2 = this.getCuePointIndex(this.asCuePoints, false, v3.time, v3.name); if (v2 < 0) { return null; } v3 = this.asCuePoints[v2]; this.asCuePoints.splice(v2, 1); v2 = this.getCuePointIndex(this.allCuePoints, false, v3.time, v3.name); if (v2 > 0) { this.allCuePoints.splice(v2, 1); } if ((this._owner.getVideoPlayer(this._id)).__get__playheadTime() > 0) { if (this._asCuePointIndex > v2) { --this._asCuePointIndex; } return v3; } this._asCuePointIndex = 0; return v3; }; v2.setFLVCuePointEnabled = function (enabled, timeNameOrCuePoint) { var v4; switch (typeof timeNameOrCuePoint) { case 'string': v4 = {'name': timeNameOrCuePoint}; break; case 'number': v4 = {'time': timeNameOrCuePoint}; break; case 'object': v4 = timeNameOrCuePoint; } var v12 = isNaN(v4.time) || v4.time < 0; var v11 = v4.name == undefined || v4.name == null; if (v12 && v11) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number and/or name must not be undefined or null'); } var v6 = 0; var v2; var v5; if (v12) { if (!this._metadataLoaded) { if (this._disabledCuePointsByNameOnly[v4.name] == undefined) { if (!enabled) { if (this._disabledCuePointsByNameOnly == null || this._disabledCuePointsByNameOnly == undefined || this._disabledCuePointsByNameOnly.length < 0) { this._disabledCuePointsByNameOnly = new Object(); } this._disabledCuePointsByNameOnly[v4.name] = new Array(); } } else { if (enabled) { this._disabledCuePointsByNameOnly[v4.name] = undefined; } return -1; } this.removeCuePoints(this._disabledCuePoints, v4); return -1; } if (enabled) { v6 = this.removeCuePoints(this._disabledCuePoints, v4); } else { var v3; v2 = this.getCuePointIndex(this.flvCuePoints, true, -1, v4.name); while (v2 >= 0) { v3 = this.flvCuePoints[v2]; v5 = this.getCuePointIndex(this._disabledCuePoints, true, v3.time); if (v5 < 0 || this._disabledCuePoints[v5].time != v3.time) { this._disabledCuePoints = this.insertCuePoint(v5, this._disabledCuePoints, {'name': v3.name, 'time': v3.time}); v6 += 1; } v2 = this.getNextCuePointIndexWithName(v3.name, this.flvCuePoints, v2); } } return v6; } v2 = this.getCuePointIndex(this._disabledCuePoints, false, v4.time, v4.name); if (v2 < 0) { if (enabled) { if (!this._metadataLoaded) { v2 = this.getCuePointIndex(this._disabledCuePoints, false, v4.time); if (v2 < 0) { v5 = this.getCuePointIndex(this._disabledCuePointsByNameOnly[v4.name], true, v4.time); if (mx.video.CuePointManager.cuePointCompare(v4.time, null, this._disabledCuePointsByNameOnly[v4.name]) != 0) { this._disabledCuePointsByNameOnly[v4.name] = this.insertCuePoint(v5, this._disabledCuePointsByNameOnly[v4.name], v4); } } else { this._disabledCuePoints.splice(v2, 1); } } return this._metadataLoaded ? 0 : -1; } } else { if (enabled) { this._disabledCuePoints.splice(v2, 1); v6 = 1; } else { v6 = 0; } return this._metadataLoaded ? v6 : -1; } if (this._metadataLoaded) { v2 = this.getCuePointIndex(this.flvCuePoints, false, v4.time, v4.name); if (v2 < 0) { return 0; } if (v11) { v4.name = this.flvCuePoints[v2].name; } } v5 = this.getCuePointIndex(this._disabledCuePoints, true, v4.time); this._disabledCuePoints = this.insertCuePoint(v5, this._disabledCuePoints, v4); v6 = 1; return this._metadataLoaded ? 1 : -1; }; v2.removeCuePoints = function (cuePointArray, cuePoint) { var v2; var v4; var v5 = 0; v2 = this.getCuePointIndex(cuePointArray, true, -1, cuePoint.name); while (v2 >= 0) { v4 = cuePointArray[v2]; cuePointArray.splice(v2, 1); --v2; ++v5; v2 = this.getNextCuePointIndexWithName(v4.name, cuePointArray, v2); } return v5; }; v2.insertCuePoint = function (insertIndex, cuePointArray, cuePoint) { if (insertIndex < 0) { cuePointArray = new Array(); cuePointArray.push(cuePoint); return cuePointArray; } if (cuePointArray[insertIndex].time > cuePoint.time) { insertIndex = 0; } else { ++insertIndex; } cuePointArray.splice(insertIndex, 0, cuePoint); return cuePointArray; }; v2.isFLVCuePointEnabled = function (timeNameOrCuePoint) { if (!this._metadataLoaded) { return true; } var v3; switch (typeof timeNameOrCuePoint) { case 'string': v3 = {'name': timeNameOrCuePoint}; break; case 'number': v3 = {'time': timeNameOrCuePoint}; break; case 'object': v3 = timeNameOrCuePoint; } var v5 = isNaN(v3.time) || v3.time < 0; var v6 = v3.name == undefined || v3.name == null; if (v5 && v6) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number and/or name must not be undefined or null'); } if (v5) { var v2 = this.getCuePointIndex(this.flvCuePoints, true, -1, v3.name); if (v2 < 0) { return true; } while (v2 >= 0) { if (this.getCuePointIndex(this._disabledCuePoints, false, this.flvCuePoints[v2].time, this.flvCuePoints[v2].name) < 0) { return true; } v2 = this.getNextCuePointIndexWithName(v3.name, this.flvCuePoints, v2); } return false; } return this.getCuePointIndex(this._disabledCuePoints, false, v3.time, v3.name) < 0; }; v2.dispatchASCuePoints = function () { var v5 = (this._owner.getVideoPlayer(this._id)).__get__playheadTime(); if ((this._owner.getVideoPlayer(this._id)).__get__stateResponsive() && this.asCuePoints != null && this.asCuePoints != undefined) { for (;;) { if (!(this._asCuePointIndex < this.asCuePoints.length && this.asCuePoints[this._asCuePointIndex].time <= v5 + this._asCuePointTolerance)) break; this._owner.dispatchEvent({'type': 'cuePoint', 'info': mx.video.CuePointManager.deepCopyObject(this.asCuePoints[this._asCuePointIndex++]), 'vp': this._id}); } } }; v2.resetASCuePointIndex = function (time) { if (time <= 0 || this.asCuePoints == null || this.asCuePoints == undefined) { this._asCuePointIndex = 0; return undefined; } var v2 = this.getCuePointIndex(this.asCuePoints, true, time); this._asCuePointIndex = this.asCuePoints[v2].time < time ? v2 + 1 : v2; }; v2.processFLVCuePoints = function (metadataCuePoints) { this._metadataLoaded = true; if (metadataCuePoints == undefined || metadataCuePoints == null || metadataCuePoints.length < 1) { this.flvCuePoints = null; this.navCuePoints = null; this.eventCuePoints = null; return undefined; } this.flvCuePoints = metadataCuePoints; this.navCuePoints = new Array(); this.eventCuePoints = new Array(); var v5; var v6 = -1; var v2; var v4 = this._disabledCuePoints; var v3 = 0; this._disabledCuePoints = new Array(); var v9 = 0; v2 = this.flvCuePoints[v9++]; while (v2 != undefined) { if (v6 > 0 && v6 >= v2.time) { this.flvCuePoints = null; this.navCuePoints = null; this.eventCuePoints = null; this._disabledCuePoints = null; this._disabledCuePointsByNameOnly = null; throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'Unsorted cuePoint found after time: ' + v6); } v6 = v2.time; for (;;) { if (!(v3 < v4.length && mx.video.CuePointManager.cuePointCompare(v4[v3].time, null, v2) < 0)) break; ++v3; } if (this._disabledCuePointsByNameOnly[v2.name] != undefined || v3 < v4.length && mx.video.CuePointManager.cuePointCompare(v4[v3].time, v4[v3].name, v2) == 0) { this._disabledCuePoints.push({'time': v2.time, 'name': v2.name}); } if (v2.type == 'navigation') { this.navCuePoints.push(v2); } else { if (v2.type == 'event') { this.eventCuePoints.push(v2); } } if (this.allCuePoints == null || this.allCuePoints == undefined || this.allCuePoints.length < 1) { this.allCuePoints = new Array(); this.allCuePoints.push(v2); } else { v5 = this.getCuePointIndex(this.allCuePoints, true, v2.time); v5 = this.allCuePoints[v5].time > v2.time ? 0 : v5 + 1; this.allCuePoints.splice(v5, 0, v2); } } delete this._disabledCuePointsByNameOnly; this._disabledCuePointsByNameOnly = null; delete this._disabledCuePointsByNameOnly; this._disabledCuePointsByNameOnly = null; }; v2.processCuePointsProperty = function (cuePoints) { if (cuePoints == undefined || cuePoints == null || cuePoints.length == 0) { return undefined; } var v4 = 0; var v8; var v6; var v7; var v5; var v9; var v2 = 0; while (v2 < cuePoints.length - 1) { switch (v4) { case 6: this.addOrDisable(v9, v5); v4 = 0; case 0: if (cuePoints[v2++] != 't') { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format'); } if (isNaN(cuePoints[v2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number'); } v5 = new Object(); v5.time = cuePoints[v2] / 1000; ++v4; break; case 1: if (cuePoints[v2++] != 'n') { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format'); } if (cuePoints[v2] == undefined || cuePoints[v2] == null) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'name cannot be null or undefined'); } v5.name = this.unescape(cuePoints[v2]); ++v4; break; case 2: if (cuePoints[v2++] != 't') { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format'); } if (isNaN(cuePoints[v2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'type must be number'); } switch (cuePoints[v2]) { case 0: v5.type = 'event'; break; case 1: v5.type = 'navigation'; break; case 2: v5.type = 'actionscript'; break; default: throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'type must be 0, 1 or 2'); } ++v4; break; case 3: if (cuePoints[v2++] != 'd') { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format'); } if (isNaN(cuePoints[v2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'disabled must be number'); } v9 = cuePoints[v2] != 0; ++v4; break; case 4: if (cuePoints[v2++] != 'p') { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected cuePoint parameter format'); } if (isNaN(cuePoints[v2])) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'num params must be number'); } v8 = cuePoints[v2]; ++v4; if (v8 == 0) { ++v4; } else { v5.parameters = new Object(); } break; case 5: v6 = cuePoints[v2++]; v7 = cuePoints[v2]; if (typeof v6 == 'string') { v6 = this.unescape(v6); } if (typeof v7 == 'string') { v7 = this.unescape(v7); } v5.parameters[v6] = v7; --v8; if (v8 == 0) { ++v4; } } ++v2; } if (v4 == 6) { this.addOrDisable(v9, v5); } else { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'unexpected end of cuePoint param string'); } }; v2.addOrDisable = function (disable, cuePoint) { if (disable) { if (cuePoint.type == 'actionscript') { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'Cannot disable actionscript cue points'); } this.setFLVCuePointEnabled(false, cuePoint); } else { if (cuePoint.type == 'actionscript') { this.addASCuePoint(cuePoint); } } }; v2.unescape = function (origStr) { var v3 = origStr; var v1 = 0; while (v1 < mx.video.CuePointManager.cuePointsReplace.length) { var v2 = v3.split(mx.video.CuePointManager.cuePointsReplace[v1++]); if (v2.length > 1) { v3 = v2.join(mx.video.CuePointManager.cuePointsReplace[v1]); } ++v1; } return v3; }; v2.getCuePointIndex = function (cuePointArray, closeIsOK, time, name, start, len) { if (cuePointArray == null || cuePointArray == undefined || cuePointArray.length < 1) { return -1; } var v13 = isNaN(time) || time < 0; var v16 = name == undefined || name == null; if (v13 && v16) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number and/or name must not be undefined or null'); } if (start == undefined || start == null) { start = 0; } if (len == undefined || len == null) { len = cuePointArray.length; } if (!v16 && (closeIsOK || v13)) { var v8; var v2; if (v13) { v8 = start; } else { v8 = this.getCuePointIndex(cuePointArray, closeIsOK, time); } v2 = v8; while (v2 >= start) { if (cuePointArray[v2].name == name) { break; } --v2; } if (v2 >= start) { return v2; } v2 = v8 + 1; while (v2 < len) { if (cuePointArray[v2].name == name) { break; } ++v2; } if (v2 < len) { return v2; } return -1; } var v6; if (len <= this._linearSearchTolerance) { var v11 = start + len; var v3 = start; while (v3 < v11) { v6 = mx.video.CuePointManager.cuePointCompare(time, name, cuePointArray[v3]); if (v6 == 0) { return v3; } if (v6 < 0) { break; } ++v3; } if (closeIsOK) { if (v3 > 0) { return v3 - 1; } return 0; } return -1; } var v12 = Math.floor(len / 2); var v15 = start + v12; v6 = mx.video.CuePointManager.cuePointCompare(time, name, cuePointArray[v15]); if (v6 < 0) { return this.getCuePointIndex(cuePointArray, closeIsOK, time, name, start, v12); } if (v6 > 0) { return this.getCuePointIndex(cuePointArray, closeIsOK, time, name, v15 + 1, v12 - 1 + len % 2); } return v15; }; v2.getNextCuePointIndexWithName = function (name, array, index) { if (name == undefined || name == null) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'name cannot be undefined or null'); } if (array == null || array == undefined) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'cuePoint.array undefined'); } if (isNaN(index) || index < -1 || index >= array.length) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'cuePoint.index must be number between -1 and cuePoint.array.length'); } var v1; v1 = index + 1; while (v1 < array.length) { if (array[v1].name == name) { break; } ++v1; } if (v1 < array.length) { return v1; } return -1; }; v1.cuePointCompare = function (time, name, cuePoint) { var v2 = Math.round(time * 1000); var v3 = Math.round(cuePoint.time * 1000); if (v2 < v3) { return -1; } if (v2 > v3) { return 1; } if (name != null || name != undefined) { if (name == cuePoint.name) { return 0; } if (name < cuePoint.name) { return -1; } return 1; } return 0; }; v2.getCuePoint = function (cuePointArray, closeIsOK, timeNameOrCuePoint) { var v3; switch (typeof timeNameOrCuePoint) { case 'string': v3 = {'name': timeNameOrCuePoint}; break; case 'number': v3 = {'time': timeNameOrCuePoint}; break; case 'object': v3 = timeNameOrCuePoint; } var v2 = this.getCuePointIndex(cuePointArray, closeIsOK, v3.time, v3.name); if (v2 < 0) { return null; } v3 = mx.video.CuePointManager.deepCopyObject(cuePointArray[v2]); v3.array = cuePointArray; v3.index = v2; return v3; }; v2.getNextCuePointWithName = function (cuePoint) { if (cuePoint == null || cuePoint == undefined) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'cuePoint parameter undefined'); } if (isNaN(cuePoint.time) || cuePoint.time < 0) { throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, 'time must be number'); } var v3 = this.getNextCuePointIndexWithName(cuePoint.name, cuePoint.array, cuePoint.index); if (v3 < 0) { return null; } var v4 = mx.video.CuePointManager.deepCopyObject(cuePoint.array[v3]); v4.array = cuePoint.array; v4.index = v3; return v4; }; v1.deepCopyObject = function (obj, recurseLevel) { if (obj == undefined || obj == null || typeof obj != 'object') { return obj; } if (recurseLevel == undefined) { recurseLevel = 0; } var v2 = new Object(); for (var v4 in obj) { if (recurseLevel == 0 && (v4 == 'array' || v4 == 'index')) { } else { if (typeof obj[v4] == 'object') { v2[v4] = mx.video.CuePointManager.deepCopyObject(obj[v4], recurseLevel + 1); } else { v2[v4] = obj[v4]; } } } return v2; }; v1.DEFAULT_LINEAR_SEARCH_TOLERANCE = 50; v1.cuePointsReplace = ['&quot;', '"', '&#39;', '\'', '&#44;', ',', '&amp;', '&']; v2.addProperty('id', v2.__get__id, function () {}); v2.addProperty('metadataLoaded', v2.__get__metadataLoaded, function () {}); v2.addProperty('playheadUpdateInterval', function () {}, v2.__set__playheadUpdateInterval); ASSetPropFlags(mx.video.CuePointManager.prototype, null, 1); } #endinitclip } frame 2 { function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } var BlackJackFlag = false; var MyBank = 0; var i; var LuckFallFlag = false; var helpFlag = false; var CurntX = 400; var CurntY = 300; var ReturnFlag = false; var coinFound = 0; var FuckedTotal = 0; var SuckTotal = 0; var PussyFuckTotal = 0; var AnalFuckTotal = 0; var SoundMind = true; var GilsDone = 0; var GirlsQ = 23; var GirlsDoneArr = new Array(24); var CardHidePlace = randRange(1, 3); var CardTakeFlag = 0; var CardUseFlag = 0; var chPin = randRange(1, 5); var PINSARR = new Array('', '7812', '2584', '1273', '5628', '9240'); var PinCorrect = PINSARR[chPin]; var CCardTotal = 20; var PinLostGN = randRange(3, 16); if (PinLostGN == 8) { PinLostGN = 7; } if (PinLostGN == 10) { PinLostGN = 9; } i = 0; while (i <= GirlsQ) { GirlsDoneArr[i] = 0; ++i; } darkFlag = true; RedHot_mc._visible = false; RedHot_mc._alpha = 0; if (afterTonnelFlag) { DarkCover_mc._alpha = 100; afterTonnelFlag = false; Play_btn._visible = false; help_btn._visible = false; } else { DarkCover_mc._alpha = 95; } Mouse.show(); stop(); DarkCover_mc.onEnterFrame = function () { if (darkFlag) { if (DarkCover_mc._alpha > 80) { DarkCover_mc._alpha -= 0.1; } else { RedHot_mc._visible = true; Play_btn._visible = true; help_btn._visible = true; if (RedHot_mc._alpha < 100) { ++RedHot_mc._alpha; } else { darkFlag = false; } } } }; Play_btn.onRelease = function () { darkFlag = false; play(); }; help_btn.onRelease = function () { helpFlag = !helpFlag; if (helpFlag) { help_mc.gotoAndPlay('goCome'); Pause_Flag = true; } else { help_mc.gotoAndPlay('goOut'); Pause_Flag = false; } }; help_mc.onRelease = function () { helpFlag = false; Pause_Flag = false; if (helpFlag) { help_mc.gotoAndPlay('goCome'); } else { help_mc.gotoAndPlay('goOut'); } }; MoreGames_btn.onRelease = function () { getURL('http://gamcore.com', '_blank'); }; } // unknown tag 88 length 71 movieClip 169 { } // unknown tag 88 length 104 movieClip 190 { } // unknown tag 88 length 120 // unknown tag 88 length 51 movieClip 203 { frame 1 { stop(); } frame 16 { stop(); } frame 24 { gotoAndStop(1); } } frame 3 { var Lighter = true; stop(); District_mc.onEnterFrame = function () { if (this._xscale < 100) { this._xscale += 2; this._yscale = this._xscale; if (this._y > 119) { this._y -= 4; } if (this._x > 142) { this._x -= 6; } if (RedHot_mc._alpha > 0) { RedHot_mc._alpha -= 4; } if (Lighter) { if (DarkCover_mc._alpha > 40) { DarkCover_mc._alpha -= 2; } else { Lighter = false; } } else { if (DarkCover_mc._alpha < 100) { DarkCover_mc._alpha += 2; } } } else { this._xscale = 100; this._yscale = this._xscale; DarkCover_mc._alpha = 100; gotoAndPlay('maincyc'); } }; } frame 4 { function initset() { InitFlag = true; helpFlag = false; LuckFallFlag = false; FallTonnelFlag = 0; BackAnSuper_mc._visible = false; BackFuckSuper_mc._visible = false; BackSuckSuper_mc._visible = false; Back2GirlsSuck_mc._visible = false; Back2GirlsFuck_mc._visible = false; AsianSuckBack_mc._visible = false; AsianFuckBack_mc._visible = false; AsianAnalBack_mc._visible = false; Congrats_mc._visible = false; tonnell_mc._visible = false; i = 1; while (i <= 4) { BoyDirs[i]._visible = false; ++i; } Dir = 3; BoyDirs[Dir]._visible = true; BoyDirs[Dir].gotoAndStop('stand0'); i = 1; while (i <= 4) { Banneddir[i] = false; dirFlag[i] = false; ++i; } i = 1; while (i <= HouseQ) { Houses[i].Hit1_btn.Comein_mc._visible = false; Houses[i].Hit1_btn.PressSpace_mc._visible = false; Houses[i].Hit2_btn.Comein_mc._visible = false; Houses[i].Hit2_btn.PressSpace_mc._visible = false; ++i; } VIF = 0; Pay_mc._visible = false; DoorOpen_mc._visible = false; CasinoFlag = false; MyBank_txt.text = MyBank; if (ReturnFlag) { District_mc._x = CurntX; District_mc._y = CurntY; } i = 1; while (i <= GirlsQ) { if (PriceSuck[i] > 0) { SuckVid[i].gotoAndStop(1); SuckVid[i]._visible = false; } if (PriceFuck[i] > 0) { FuckVid[i].gotoAndStop(1); FuckVid[i]._visible = false; } if (PriceAnal[i] > 0) { AnalVid[i].gotoAndStop(1); AnalVid[i]._visible = false; } ++i; } Room01_mc._visible = false; Room01_mc.Clock_mc.ArrowT_mc._rotation = 0; if (coinFound == 0) { fallFlag = 0.5; ++coinFound; fallSec = 0; } if (coinFound > 0) { if (MyBank == 0) { if (randRange(1, 100) > 50) { fallFlag = 0.5; ++coinFound; fallSec = -randRange(4, 10); } } } fcc = 0; fcQ = 0; wtAT = 0; Euro_mc._visible = false; EuroP1_mc._visible = false; EuroP1_mc._rotation = 0; Roofs_mc._alpha = 100; SpacePressed = false; FuckedTotal_txt.text = FuckedTotal; TotalGirls_txt.text = GilsDone + '/' + GirlsQ; if (SoundMind) { SoundOn_mc.gotoAndPlay(2); SoundOn_btn._visible = false; } else { SoundOn_btn._visible = true; } CCard_mc._visible = false; cardOnPanel_mc._visible = false; if (CardTakeFlag == 3) { cardOnPanel_mc._visible = true; } Vitrina1_mc.NotePin_mc._visible = false; ATMBig_mc.cardInsert_mc._visible = false; Eur20CashFall_mc._visible = false; ATMInit(); } function ATMInit() { ATMBig_mc.InsertCartTXT_mc._visible = false; ATMBig_mc.PinEnter_mc._visible = false; ATMBig_mc.incorrPIN_mc._visible = false; ATMBig_mc.PINTXT_txt._visible = false; ATMBig_mc.TakeMonetTXT_mc._visible = false; ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.SumIncorTXT_mc._visible = false; ATMBig_mc.takeCardTXT_mc._visible = false; ATMBig_mc.Only2050TXT_mc._visible = false; ATMBig_mc.PinEnter_mc.Slash_mc._visible = true; PinN = 0; i = 0; while (i <= 3) { PinArr[i] = ''; ++i; } PIN = ''; pinOver = false; PinUpTXT_txt.text = ''; PinUpTXT_txt._visible = false; info_txt.text = ''; } function EnterCasino() { VitrCasino_mc.dark_mc._visible = true; VitrCasino_mc.dark_mc._alpha = 0; VitrCasino_mc.DoorCasino_mc._xscale = 100; VitrCasino_mc.DoorCasino_mc.DoorShine_mc._alpha = 0; MyPoint.x = Houses[2]._x; MyPoint.y = Houses[2]._y; District_mc.localToGlobal(MyPoint); touchX = MyPoint.x; touchY = MyPoint.y + 75; VitrCasino_mc._x = touchX; VitrCasino_mc._y = touchY; VitrCasino_mc._visible = true; DarkFon_mc._alpha = 80; Roofs_mc._alpha = 10; CasinoFlag = true; } function EntreBilliard() { VitrBilliard_mc.dark_mc._visible = true; VitrBilliard_mc.dark_mc._alpha = 0; VitrBilliard_mc.DoorCasino_mc._xscale = 100; VitrBilliard_mc.DoorCasino_mc.DoorShine_mc._alpha = 0; MyPoint.x = Houses[8]._x; MyPoint.y = Houses[8]._y; District_mc.localToGlobal(MyPoint); touchX = MyPoint.x; touchY = MyPoint.y + 75; VitrBilliard_mc._x = touchX; VitrBilliard_mc._y = touchY; VitrBilliard_mc._visible = true; DarkFon_mc._alpha = 80; Roofs_mc._alpha = 10; BilliardFlag = true; } function EnterPoker() { VitrPoker_mc.dark_mc._visible = true; VitrPoker_mc.dark_mc._alpha = 0; VitrPoker_mc.DoorCasino_mc._xscale = 100; VitrPoker_mc.DoorCasino_mc.DoorShine_mc._alpha = 0; MyPoint.x = Houses[17]._x; MyPoint.y = Houses[17]._y; District_mc.localToGlobal(MyPoint); touchX = MyPoint.x; touchY = MyPoint.y + 75; VitrPoker_mc._x = touchX; VitrPoker_mc._y = touchY; VitrPoker_mc._visible = true; DarkFon_mc._alpha = 80; Roofs_mc._alpha = 10; PokerFlag = true; } function OpenVitrina(VitrN) { var v1; WindShift = 60; MyPoint.x = Houses[VitrN]._x; MyPoint.y = Houses[VitrN]._y; District_mc.localToGlobal(MyPoint); VIF = VitrN; VitrinaMem = VIF; touchX = MyPoint.x; touchY = MyPoint.y + 150; Vitrina1_mc._x = touchX; Vitrina1_mc._y = touchY; j = 1; while (j <= GirlsQ) { GirlsArr[j]._visible = false; ++j; } GirlsArr[VIF]._visible = true; if (VIF == PinLostGN) { Vitrina1_mc.NotePin_mc._visible = true; } else { Vitrina1_mc.NotePin_mc._visible = false; } if (K < 0) { if (PriceSuck[GN] > 0) { GirlsArr[VIF].Price2_mc.Suck_txt.text = 'SUCK..€' + PriceSuck[GN]; GirlsArr[VIF].Price2_mc.Suck_txt._visible = true; } else { GirlsArr[VIF].Price2_mc.Suck_txt._visible = false; } if (PriceFuck[GN] > 0) { GirlsArr[VIF].Price2_mc.Fuck_txt.text = 'FUCK..€' + PriceFuck[GN]; GirlsArr[VIF].Price2_mc.Fuck_txt._visible = true; } else { GirlsArr[VIF].Price2_mc.Fuck_txt._visible = false; } if (PriceAnal[GN] > 0) { GirlsArr[VIF].Price2_mc.Anal_txt.text = 'ANAL.€' + PriceAnal[GN]; GirlsArr[VIF].Price2_mc.Anal_txt._visible = true; } else { GirlsArr[VIF].Price2_mc.Anal_txt._visible = false; } if (PriceSuck[GN - 1] > 0) { GirlsArr[VIF].Price1_mc.Suck_txt.text = 'SUCK..€' + PriceSuck[GN - 1]; GirlsArr[VIF].Price1_mc.Suck_txt._visible = true; } else { GirlsArr[VIF].Price1_mc.Suck_txt._visible = false; } if (PriceFuck[GN - 1] > 0) { GirlsArr[VIF].Price1_mc.Fuck_txt.text = 'FUCK..€' + PriceFuck[GN - 1]; GirlsArr[VIF].Price1_mc.Fuck_txt._visible = true; } else { GirlsArr[VIF].Price1_mc.Fuck_txt._visible = false; } if (PriceAnal[GN - 1] > 0) { GirlsArr[VIF].Price1_mc.Anal_txt.text = 'ANAL.€' + PriceAnal[GN - 1]; GirlsArr[VIF].Price1_mc.Anal_txt._visible = true; } else { GirlsArr[VIF].Price1_mc.Anal_txt._visible = false; } } if (K >= 0) { if (PriceSuck[GN] > 0) { GirlsArr[VIF].Price1_mc.Suck_txt.text = 'SUCK..€' + PriceSuck[GN]; GirlsArr[VIF].Price1_mc.Suck_txt._visible = true; } else { GirlsArr[VIF].Price1_mc.Suck_txt._visible = false; } if (PriceFuck[GN] > 0) { GirlsArr[VIF].Price1_mc.Fuck_txt.text = 'FUCK..€' + PriceFuck[GN]; GirlsArr[VIF].Price1_mc.Fuck_txt._visible = true; } else { GirlsArr[VIF].Price1_mc.Fuck_txt._visible = false; } if (PriceAnal[GN] > 0) { GirlsArr[VIF].Price1_mc.Anal_txt.text = 'ANAL.€' + PriceAnal[GN]; GirlsArr[VIF].Price1_mc.Anal_txt._visible = true; } else { GirlsArr[VIF].Price1_mc.Anal_txt._visible = false; } if (PriceSuck[GN + 1] > 0) { GirlsArr[VIF].Price2_mc.Suck_txt.text = 'SUCK..€' + PriceSuck[GN + 1]; GirlsArr[VIF].Price2_mc.Suck_txt._visible = true; } else { GirlsArr[VIF].Price2_mc.Suck_txt._visible = false; } if (PriceFuck[GN + 1] > 0) { GirlsArr[VIF].Price2_mc.Fuck_txt.text = 'FUCK..€' + PriceFuck[GN + 1]; GirlsArr[VIF].Price2_mc.Fuck_txt._visible = true; } else { GirlsArr[VIF].Price2_mc.Fuck_txt._visible = false; } if (PriceAnal[GN + 1] > 0) { GirlsArr[VIF].Price2_mc.Anal_txt.text = 'ANAL.€' + PriceAnal[GN + 1]; GirlsArr[VIF].Price2_mc.Anal_txt._visible = true; } else { GirlsArr[VIF].Price2_mc.Anal_txt._visible = false; } } Pay_mc._visible = false; Vitrina1_mc.VtWall1_mc._visible = false; Vitrina1_mc.VtWall2_mc._visible = false; if (WallType[VitrN] == 1) { Vitrina1_mc.VtWall1_mc._visible = true; } if (WallType[VitrN] == 2) { Vitrina1_mc.VtWall2_mc._visible = true; } Vitrina1_mc._visible = true; DWx = (WindShift * 5 - (400 - WindShift * 5)) / 24; DWy = (300 - Vitrina1_mc._y) / 25; DarkFon_mc._alpha = 80; Katz_mc._visible = false; if (EuroP1_mc._visible) { EuroP1_mc._visible = false; CoinMind = true; } v1 = 1; while (v1 <= HouseQ) { Houses[v1].Hit1_btn._visible = false; Houses[v1].Hit2_btn._visible = false; ++v1; } Roofs_mc._alpha = 0; flVt = 2; cn = 0; } function SuckClip(GrlN) { if (PriceSuck[GN] > 0) { VideoFlv = false; if (GN == 1) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/Suck_super041.flv'); my_flvPb.play(); my_flvPb._visible = true; BackSuckSuper_mc._visible = true; VideoFlv = true; } if (GN == 22) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/2Suck01.flv'); my_flvPb.play(); my_flvPb._visible = true; Back2GirlsSuck_mc._visible = true; VideoFlv = true; } if (GN == 23) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/AsianSuck.flv'); my_flvPb.play(); my_flvPb._visible = true; AsianSuckBack_mc._visible = true; VideoFlv = true; } if (!VideoFlv) { SuckVid[GN].play(); SuckVid[GN]._visible = true; } } } function FuckClip(GrlN) { if (PriceFuck[GN] > 0) { VideoFlv = false; if (GN == 1) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/Fuck_super021.flv'); my_flvPb.play(); my_flvPb._visible = true; BackFuckSuper_mc._visible = true; VideoFlv = true; } if (GN == 22) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/2Fuck02.flv'); my_flvPb.play(); my_flvPb._visible = true; Back2GirlsFuck_mc._visible = true; VideoFlv = true; } if (GN == 23) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/AsianFuck.flv'); my_flvPb.play(); my_flvPb._visible = true; AsianFuckBack_mc._visible = true; VideoFlv = true; } if (!VideoFlv) { FuckVid[GN].play(); FuckVid[GN]._visible = true; } } } function AnalClip(GrlN) { if (PriceAnal[GN] > 0) { VideoFlv = false; if (GN == 1) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/Anal_super01.flv'); my_flvPb.play(); my_flvPb._visible = true; BackAnSuper_mc._visible = true; VideoFlv = true; } if (GN == 23) { my_flvPb.__set__contentPath('http://lv7.fgn.me/common/flashes/bf/red_light_district/AsianAnal.flv'); my_flvPb.play(); my_flvPb._visible = true; AsianAnalBack_mc._visible = true; VideoFlv = true; } if (!VideoFlv) { AnalVid[GN].play(); AnalVid[GN]._visible = true; } } } function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } var VictoryFlag = false; var LevChngFlag = false; var helpFlag = false; var winFlag = false; var speed = 8; var Dir = 4; var j; var i = 1; var moveFlag = false; var head1X; var head1Y; var HeadsX = new Array(9); var HeadsY = new Array(9); var testX; var testY; var myPoint1 = new Object(); var KatzX = District_mc._x; var KatzY = District_mc._y; var prevX = District_mc._x; var prevY = District_mc._y; var prevY2 = District_mc._y; var dirFlag = new Array(false, false, false, false, false); var Banneddir = new Array(false, false, false, false, false); var cc = 0; var sec = 0; var min = 0; var walkFlag = true; var CasinoFlag = false; var BilliardFlag = false; var PoolFlag = false; var PokerFlag = false; var PokerPlayFlag = false; var walkLim = randRange(0, 4); var GiftNum = 0; var PCnt = 0; var cn = o; var flVt = 0; var DoneCount = 0; var FallTonnelFlag = 0; var PointsQ = 8; var Points = new Array(9); Points[1] = Katz_mc.point1_mc; Points[2] = Katz_mc.point2_mc; Points[3] = Katz_mc.point3_mc; Points[4] = Katz_mc.point4_mc; Points[5] = Katz_mc.point5_mc; Points[6] = Katz_mc.point6_mc; Points[7] = Katz_mc.point7_mc; Points[8] = Katz_mc.point8_mc; var BoyDirs = new Array(5); BoyDirs[1] = Katz_mc.BoyRight_mc; BoyDirs[2] = Katz_mc.BoyFront_mc; BoyDirs[3] = Katz_mc.BoyLeft_mc; BoyDirs[4] = Katz_mc.BoyBack_mc; var VIF = 0; var Vscale = 20; var MyPoint = new Object(); var touchX; var touchY; var HouseQ = 19; var Houses = new Array(21); Houses[1] = District_mc.Building10_mc; Houses[2] = District_mc.Building12_mc; Houses[3] = District_mc.Building14_mc; Houses[4] = District_mc.Building16_mc; Houses[5] = District_mc.Building18_mc; Houses[6] = District_mc.Building20_mc; Houses[7] = District_mc.Building22_mc; Houses[8] = District_mc.Building24_mc; Houses[9] = District_mc.Building26_mc; Houses[10] = District_mc.Building28_mc; Houses[11] = District_mc.Building30_mc; Houses[12] = District_mc.Building32_mc; Houses[13] = District_mc.Building34_mc; Houses[14] = District_mc.Building36_mc; Houses[15] = District_mc.Building38_mc; Houses[16] = District_mc.Building40_mc; Houses[17] = District_mc.Building42_mc; Houses[18] = District_mc.Building44_mc; Houses[19] = District_mc.Building27_mc; District_mc.Building10_mc.N_txt.text = 10; District_mc.Building12_mc.N_txt.text = 12; District_mc.Building14_mc.N_txt.text = 14; District_mc.Building16_mc.N_txt.text = 16; District_mc.Building18_mc.N_txt.text = 18; District_mc.Building20_mc.N_txt.text = 20; District_mc.Building22_mc.N_txt.text = 22; District_mc.Building24_mc.N_txt.text = 24; District_mc.Building26_mc.N_txt.text = 26; District_mc.Building28_mc.N_txt.text = 28; District_mc.Building30_mc.N_txt.text = 30; District_mc.Building32_mc.N_txt.text = 32; District_mc.Building34_mc.N_txt.text = 34; District_mc.Building36_mc.N_txt.text = 36; District_mc.Building38_mc.N_txt.text = 38; District_mc.Building40_mc.N_txt.text = 40; District_mc.Building42_mc.N_txt.text = 42; District_mc.Building44_mc.N_txt.text = 44; District_mc.Building27_mc.N_txt.text = 27; var WindShift; var DWx; var DWy; var VitrinaMem; var VDF = 0; var K = 1; var Yo = 0; var BannersArr = new Array(10); var BannersQ = 5; var Choice = 1; var ContactX; var ContactY; var BordX; var BordY; var VideoFlv = false; var GN = 1; var GirlsArr = new Array(20); GirlsArr[1] = Vitrina1_mc.GirlsB01; GirlsArr[2] = Vitrina1_mc.GirlsB02; GirlsArr[3] = Vitrina1_mc.GirlsB03; GirlsArr[4] = Vitrina1_mc.GirlsB04; GirlsArr[5] = Vitrina1_mc.GirlsB05; GirlsArr[6] = Vitrina1_mc.GirlsB06; GirlsArr[7] = Vitrina1_mc.GirlsB07; GirlsArr[8] = Vitrina1_mc.GirlsB08; GirlsArr[9] = Vitrina1_mc.GirlsB09; GirlsArr[10] = Vitrina1_mc.GirlsB10; GirlsArr[11] = Vitrina1_mc.GirlsB11; GirlsArr[12] = Vitrina1_mc.GirlsB12; GirlsArr[13] = Vitrina1_mc.GirlsB13; GirlsArr[14] = Vitrina1_mc.GirlsB14; GirlsArr[15] = Vitrina1_mc.GirlsB15; GirlsArr[16] = Vitrina1_mc.GirlsB16; GirlsArr[17] = Vitrina1_mc.GirlsB17; GirlsArr[18] = Vitrina1_mc.GirlsB18; GirlsArr[19] = Vitrina1_mc.GirlsB19; var GnLArr = new Array(0, 0, 0, 1, 2, 4, 6, 8, 0, 10, 0, 12, 14, 16, 17, 19, 21, 0, 0, 22); var GnRArr = new Array(0, 0, 0, 0, 3, 5, 7, 9, 0, 11, 0, 13, 15, 0, 18, 20, 0, 0, 0, 23); var WallType = new Array(0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2); var PriceSuck = new Array(0, 150, 50, 20, 30, 20, 25, 0, 0, 0, 50, 0, 20, 20, 20, 40, 20, 20, 20, 20, 20, 20, 100, 20); var PriceFuck = new Array(0, 250, 55, 50, 50, 60, 50, 80, 50, 0, 0, 70, 50, 0, 50, 50, 60, 0, 0, 50, 50, 0, 300, 49); var PriceAnal = new Array(0, 300, 0, 0, 0, 0, 0, 0, 150, 160, 0, 0, 0, 0, 0, 160, 0, 0, 0, 0, 150, 150, 0, 149); var SuckVid = new Array(); SuckVid[1] = SuckBlondeSuper_mc; SuckVid[2] = SuckBlack_mc; SuckVid[3] = SuckRed1_mc; SuckVid[4] = SuckUpDown_mc; SuckVid[5] = SuckBlond2000_mc; SuckVid[6] = SuckJessa2_mc; SuckVid[10] = Suck_side_mc; SuckVid[12] = SuckBrun01_mc; SuckVid[13] = SuckRed3_mc; SuckVid[14] = SuckHalia_mc; SuckVid[15] = SuckBarbara_mc; SuckVid[16] = SuckCloseUp_mc; SuckVid[17] = SuckStacy_mc; SuckVid[18] = SuckBlondALice_mc; SuckVid[19] = SuckSF_mc; SuckVid[20] = SuckIvana_mc; SuckVid[21] = SuckGolden_mc; var SuckQ = 21; var FuckVid = new Array(); FuckVid[1] = FuckBlondeSuper_mc; FuckVid[2] = FuckBlack_mc; FuckVid[3] = FuckRed1_mc; FuckVid[4] = FuckTigerTop_mc; FuckVid[5] = FuckBritneyBeth_mc; FuckVid[6] = FuckJessa2_mc; FuckVid[7] = FuckBusty_mc; FuckVid[8] = FuckOnTable_mc; FuckVid[11] = FuckJessa_mc; FuckVid[12] = FuckBrun2_mc; FuckVid[14] = FuckHalia_mc; FuckVid[15] = FuckBarbara_mc; FuckVid[16] = FuckCloseUp_mc; FuckVid[19] = FuckDogyBlonde_mc; FuckVid[20] = FuckIvana_mc; var FuckQ = 20; var AnalVid = new Array(); AnalVid[1] = AnalBlondeSuper_mc; AnalVid[9] = AnalFishnet_mc; AnalVid[8] = AnalOnTable_mc; AnalVid[15] = AnalBarbara_mc; AnalVid[20] = AnalIvanaSugar_mc; AnalVid[21] = AnalGolden_mc; var AnalQ = 20; BannersArr[1] = 'BannerVirtua'; BannersArr[2] = 'Banner2'; BannersArr[3] = 'bannerN1'; BannersArr[4] = 'bannerN2'; BannersArr[5] = 'bannerN3'; i = 1; while (i <= FuckQ) { FuckVid[i]._x = 200; FuckVid[i]._y = 150; ++i; } var FuckFlag = 0; var EnterDoor = 0; var ccAr = 0; var SecAr = 0; var ArwDir = 0; var ArwIncr = 6; var fucktime = 30; var TimeOn = false; var InitFlag = true; var fallFlag = 0; var FallSpeed = 20; var fcc = 0; var fcQ = 0; var fallSec = 0; var CoinMind = false; var ATMOpenFlag = 0; var PIN = ''; var PinN = 0; var PinArr = new Array(4); i = 0; while (i <= 3) { PinArr[i] = ''; ++i; } var pinOver = false; var wtAT = 0; var DoorComeIn = 0; var Door1_2 = 0; var SpacePressed = false; var ArrPinClips = new Array(6); ArrPinClips[1] = Vitrina1_mc.NotePin_mc.pinM1_mc; ArrPinClips[2] = Vitrina1_mc.NotePin_mc.pinM2_mc; ArrPinClips[3] = Vitrina1_mc.NotePin_mc.pinM3_mc; ArrPinClips[4] = Vitrina1_mc.NotePin_mc.pinM4_mc; ArrPinClips[5] = Vitrina1_mc.NotePin_mc.pinM5_mc; i = 1; while (i <= 5) { ArrPinClips[i]._visible = false; ++i; } ArrPinClips[chPin]._visible = true; Vitrina1_mc._visible = false; VitrCasino_mc._visible = false; VitrCasino_mc.dark_mc._visible = false; VitrBilliard_mc._visible = false; VitrBilliard_mc.dark_mc._visible = false; VitrPoker_mc._visible = false; VitrPoker_mc.dark_mc._visible = false; ATMBig_mc._visible = false; ATMBig_mc.dark_mc._visible = false; DarkFon_mc._alpha = 0; NumsHouses_mc._visible = false; SoundOn_btn._visible = false; Eur20Curr_mc.setMask(ATMBig_mc.cashMask_mc); var my_flvPb; var myListener = new Object(); myListener.onKeyDown = function () { if (!winFlag) { info_txt.text = ' '; switch (Key.getCode()) { case 37: if (!Banneddir[3]) { Dir = 3; dirFlag[Dir] = true; Banneddir[1] = false; moveFlag = true; i = 1; while (i <= 4) { Banneddir[i] = false; ++i; } } break; case 38: if (!Banneddir[4]) { Dir = 4; dirFlag[Dir] = true; Banneddir[2] = false; moveFlag = true; i = 1; while (i <= 4) { Banneddir[i] = false; ++i; } } break; case 39: if (!Banneddir[1]) { Dir = 1; dirFlag[Dir] = true; Banneddir[3] = false; moveFlag = true; i = 1; while (i <= 4) { Banneddir[i] = false; ++i; } } break; case 40: if (!Banneddir[2]) { Dir = 2; dirFlag[Dir] = true; Banneddir[4] = false; moveFlag = true; i = 1; while (i <= 4) { Banneddir[i] = false; ++i; } } break; case 32: if (!winFlag) { moveFlag = false; if (!Vitrina1_mc._visible) { if (EnterDoor < 1) { SpacePressed = true; } } if (Vitrina1_mc._visible && Vitrina1_mc._xscale == 600) { VDF = VitrinaMem; Pay_mc._visible = false; info_txt.text = ' '; cn = 0; } } } } }; myListener.onKeyUp = function () { switch (Key.getCode()) { case 37: dirFlag[3] = false; break; case 38: dirFlag[4] = false; break; case 39: dirFlag[1] = false; break; case 40: dirFlag[2] = false; break; case 32: if (!winFlag) { SpacePressed = false; } } if (!dirFlag[1] && !dirFlag[2] && !dirFlag[3] && !dirFlag[4]) { moveFlag = false; BoyDirs[Dir].gotoAndStop('stand0'); } }; Key.addListener(myListener); initset(); stop(); Katz_mc.onEnterFrame = function () { prevY2 = prevY; prevX = District_mc._x; prevY = District_mc._y; if (moveFlag) { i = 1; while (i <= 4) { if (dirFlag[i]) { switch (i) { case 1: District_mc._x -= speed; break; case 2: District_mc._y -= speed; break; case 3: District_mc._x += speed; break; case 4: District_mc._y += speed; } } ++i; } Roofs_mc._x = District_mc._x; Roofs_mc._y = District_mc._y; if (EuroP1_mc._visible) { EuroP1_mc._x -= prevX - District_mc._x; EuroP1_mc._y -= prevY - District_mc._y; } if (Dir != 0) { i = 1; while (i <= 4) { BoyDirs[i]._visible = false; ++i; } BoyDirs[Dir]._visible = true; BoyDirs[Dir].play(); } } else {} PCnt = 0; testX = 0; testY = 0; if (District_mc.DistrBorderV1_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x - speed - 1; Banneddir[3] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderV3_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x - speed - 1; Banneddir[3] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderV5_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x - speed - 1; Banneddir[3] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderV7_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x - speed - 1; Banneddir[3] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderV2_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x + speed + 1; Banneddir[1] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderV4_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x + speed + 1; Banneddir[1] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderV6_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x + speed + 1; Banneddir[1] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderV8_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._x = District_mc._x + speed + 1; Banneddir[1] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderH1_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._y = District_mc._y - speed - 1; Banneddir[4] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderH5_mc.hitTest(Katz_mc.Contact_mc)) { District_mc._y = District_mc._y + speed + 1; Banneddir[2] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } if (District_mc.DistrBorderH2_mc.hitTest(Katz_mc.Contact_mc)) { myPoint1.x = Katz_mc.Contact_mc._x; myPoint1.y = Katz_mc.Contact_mc._y; Katz_mc.localToGlobal(myPoint1); ContactX = myPoint1.x; ContactY = myPoint1.y; myPoint1.x = District_mc.DistrBorderH2_mc._x; myPoint1.y = District_mc.DistrBorderH2_mc._y; District_mc.localToGlobal(myPoint1); BordX = myPoint1.x; BordY = myPoint1.y; if (ContactY < BordY) { District_mc._y = District_mc._y + speed + 1; Banneddir[2] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } else { District_mc._y = District_mc._y - speed - 1; Banneddir[4] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } } if (District_mc.DistrBorderH3_mc.hitTest(Katz_mc.Contact_mc)) { myPoint1.x = Katz_mc.Contact_mc._x; myPoint1.y = Katz_mc.Contact_mc._y; Katz_mc.localToGlobal(myPoint1); ContactX = myPoint1.x; ContactY = myPoint1.y; myPoint1.x = District_mc.DistrBorderH3_mc._x; myPoint1.y = District_mc.DistrBorderH3_mc._y; District_mc.localToGlobal(myPoint1); BordX = myPoint1.x; BordY = myPoint1.y; if (ContactY < BordY) { District_mc._y = District_mc._y + speed + 1; Banneddir[2] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } else { District_mc._y = District_mc._y - speed - 1; Banneddir[4] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } } if (District_mc.DistrBorderH4_mc.hitTest(Katz_mc.Contact_mc)) { myPoint1.x = Katz_mc.Contact_mc._x; myPoint1.y = Katz_mc.Contact_mc._y; Katz_mc.localToGlobal(myPoint1); ContactX = myPoint1.x; ContactY = myPoint1.y; myPoint1.x = District_mc.DistrBorderH4_mc._x; myPoint1.y = District_mc.DistrBorderH4_mc._y; District_mc.localToGlobal(myPoint1); BordX = myPoint1.x; BordY = myPoint1.y; if (ContactY < BordY) { District_mc._y = District_mc._y + speed + 1; Banneddir[2] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } else { District_mc._y = District_mc._y - speed - 1; Banneddir[4] = true; BoyDirs[Dir].gotoAndStop('stand0'); Dir = 0; } } Roofs_mc._x = District_mc._x; Roofs_mc._y = District_mc._y; CurntX = District_mc._x; CurntY = District_mc._y; }; timer_mc.onEnterFrame = function () { ++cc; if (cc >= 25) { cc = 0; ++sec; if (fallSec < 2) { ++fallSec; } if (sec >= 60) { sec = 0; ++min; } } if (fallFlag == 0.5) { if (fallSec == 2) { if (!Vitrina1_mc._visible) { fallFlag = 1; Euro_mc._visible = true; fallSec = 100; } } } }; Katz_mc.HeadBoy_mc.onEnterFrame = function () { var v3; i = 1; while (i <= HouseQ) { v3 = false; if (this.hitTest(Houses[i].Hit1_btn)) { Houses[i].Hit1_btn.Comein_mc._visible = true; if (!moveFlag) { j = 1; while (j <= 4) { BoyDirs[j]._visible = false; ++j; } BoyDirs[4]._visible = true; BoyDirs[4].gotoAndStop('stand0'); } if (SpacePressed) { if (i == 2 || i == 8 || i == 17) { v3 = true; } else { K = 1; if (i == 3 || i == 13 || i == 16) { K = 0; } GN = GnLArr[i]; OpenVitrina(i); } if (v3) { if (i == 2) { EnterCasino(); } if (i == 8) { EntreBilliard(); } if (i == 17) { EnterPoker(); } } } } else { Houses[i].Hit1_btn.Comein_mc._visible = false; } if (this.hitTest(Houses[i].Hit2_btn)) { Houses[i].Hit2_btn.Comein_mc._visible = true; if (!moveFlag) { j = 1; while (j <= 4) { BoyDirs[j]._visible = false; ++j; } BoyDirs[4]._visible = true; BoyDirs[4].gotoAndStop('stand0'); } if (SpacePressed) { K = -1; GN = GnRArr[i]; OpenVitrina(i); } } else { Houses[i].Hit2_btn.Comein_mc._visible = false; } if (Houses[i].Hit1_btn.Comein_mc._visible) { if (Houses[i].Hit1_btn.Comein_mc.hitTest(_root._xmouse, _root._ymouse, true)) { Houses[i].Hit1_btn.PressSpace_mc._visible = true; } else { Houses[i].Hit1_btn.PressSpace_mc._visible = false; } } if (Houses[i].Hit2_btn.Comein_mc._visible) { if (Houses[i].Hit2_btn.Comein_mc.hitTest(_root._xmouse, _root._ymouse, true)) { Houses[i].Hit2_btn.PressSpace_mc._visible = true; } else { Houses[i].Hit2_btn.PressSpace_mc._visible = false; } } ++i; } }; Houses[2].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { EnterCasino(); } }; Houses[8].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { EntreBilliard(); } }; Houses[17].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { EnterPoker(); } }; District_mc.ATM_mc.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { ATMBig_mc.dark_mc._visible = true; ATMBig_mc.dark_mc._alpha = 50; MyPoint.x = District_mc.ATM_mc._x; MyPoint.y = District_mc.ATM_mc._y; District_mc.localToGlobal(MyPoint); touchX = MyPoint.x; touchY = MyPoint.y + 75; ATMBig_mc._x = touchX; ATMBig_mc._y = touchY; ATMBig_mc._visible = true; DarkFon_mc._alpha = 80; Roofs_mc._alpha = 0; info_txt.text = ''; ATMBig_mc.InsertCartTXT_mc._visible = true; ATMOpenFlag = 1; } }; Houses[3].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 0; GN = 1; OpenVitrina(3); } }; Houses[4].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 2; OpenVitrina(4); } }; Houses[4].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 3; OpenVitrina(4); } }; Houses[5].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 4; OpenVitrina(5); } }; Houses[5].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 5; OpenVitrina(5); } }; Houses[6].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 6; OpenVitrina(6); } }; Houses[6].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 7; OpenVitrina(6); } }; Houses[7].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 8; OpenVitrina(7); } }; Houses[7].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 9; OpenVitrina(7); } }; Houses[9].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 10; OpenVitrina(9); } }; Houses[9].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 11; OpenVitrina(9); } }; Houses[11].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 12; OpenVitrina(11); } }; Houses[11].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 13; OpenVitrina(11); } }; Houses[12].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 14; OpenVitrina(12); } }; Houses[12].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 15; OpenVitrina(12); } }; Houses[13].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 0; GN = 16; OpenVitrina(13); } }; Houses[14].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 17; OpenVitrina(14); } }; Houses[14].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 18; OpenVitrina(14); } }; Houses[15].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 19; OpenVitrina(15); } }; Houses[15].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 20; OpenVitrina(15); } }; Houses[16].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 0; GN = 21; OpenVitrina(16); } }; Houses[19].Hit1_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = 1; GN = 22; OpenVitrina(19); } }; Houses[19].Hit2_btn.onRelease = function () { if (Katz_mc.HeadBoy_mc.hitTest(this)) { K = -1; GN = 23; OpenVitrina(19); } }; LocIncr_mc.onEnterFrame = function () { if (VIF > 0) { if (flVt == 2) { if (Vitrina1_mc._xscale < 600) { Vitrina1_mc._xscale += Vscale; Vitrina1_mc._yscale = Vitrina1_mc._xscale; Vitrina1_mc._x += DWx * K; Vitrina1_mc._y += DWy; if (Roofs_mc._alpha > 0) { Roofs_mc._alpha -= 2; } if (DarkFon_mc._alpha < 100) { DarkFon_mc._alpha += 2; } ++cn; } else { Vitrina1_mc._xscale = 600; Vitrina1_mc._yscale = Vitrina1_mc._xscale; DarkFon_mc._alpha = 100; Vitrina1_mc._x = 400 + WindShift * K * 5; Vitrina1_mc._y = 300; VIF = 0; flVt = 0; if (K <= 0) { Pay_mc._x = 700; } else { Pay_mc._x = 100; } if (PriceSuck[GN] > 0) { Pay_mc.Suck_btn._visible = true; } else { Pay_mc.Suck_btn._visible = false; } if (PriceFuck[GN] > 0) { Pay_mc.Fuck_btn._visible = true; } else { Pay_mc.Fuck_btn._visible = false; } if (PriceAnal[GN] > 0) { Pay_mc.Anal_btn._visible = true; } else { Pay_mc.Anal_btn._visible = false; } Pay_mc._visible = true; Choice = randRange(1, BannersQ); } } } if (VDF > 0) { if (Vitrina1_mc._xscale > 100) { Vitrina1_mc._xscale -= Vscale; Vitrina1_mc._yscale = Vitrina1_mc._xscale; Vitrina1_mc._x += DWx * -K; Vitrina1_mc._y -= DWy; if (DarkFon_mc._alpha > 80) { DarkFon_mc._alpha -= 1; if (Roofs_mc._alpha < 100) { } } ++cn; } else { Vitrina1_mc._xscale = 100; Vitrina1_mc._yscale = Vitrina1_mc._xscale; DarkFon_mc._alpha = 0; Vitrina1_mc._x = touchX; Vitrina1_mc._y = touchY; i = 1; while (i <= HouseQ) { Houses[i].Hit1_btn._visible = true; Houses[i].Hit2_btn._visible = true; ++i; } VDF = 0; Vitrina1_mc._visible = false; Katz_mc._visible = true; if (CoinMind) { CoinMind = false; EuroP1_mc._visible = true; } Roofs_mc._alpha = 100; } } if (EnterDoor == 1) { if (DoorOpen_mc._currentframe < 19) { Vitrina1_mc._xscale += Vscale; Vitrina1_mc._yscale = Vitrina1_mc._xscale; DoorOpen_mc._xscale = Vitrina1_mc._xscale; DoorOpen_mc._yscale = DoorOpen_mc._xscale; if (K <= 0) { Vitrina1_mc._x -= 6; } else { Vitrina1_mc._x += 10; } } else { Vitrina1_mc._visible = false; Vitrina1_mc._xscale = 100; Vitrina1_mc._yscale = Vitrina1_mc._xscale; DoorOpen_mc._xscale = Vitrina1_mc._xscale; DoorOpen_mc._yscale = DoorOpen_mc._xscale; DoorOpen_mc._visible = false; EnterDoor = 2; } } if (EnterDoor == 2) { Room01_mc._visible = true; switch (FuckFlag) { case 1: SuckClip(GN); break; case 2: FuckClip(GN); break; case 3: AnalClip(GN); } TimeOn = true; EnterDoor = 3; } if (EnterDoor == 3) { if (DarkFon_mc._alpha > 0) { DarkFon_mc._alpha -= 4; } else { DarkFon_mc._alpha = 0; EnterDoor = 100; } } if (EnterDoor == 4) { if (DarkCover_mc._alpha < 100) { DarkCover_mc._alpha += 4; } else { DarkCover_mc._alpha = 100; EnterDoor = 5; } } if (EnterDoor == 5) { if (!TimeOn) { VideoFlv = false; switch (FuckFlag) { case 1: if (GN == 1) { my_flvPb.stop(); my_flvPb._visible = false; BackSuckSuper_mc._visible = false; VideoFlv = true; } if (GN == 22) { my_flvPb.stop(); my_flvPb._visible = false; Back2GirlsSuck_mc._visible = false; VideoFlv = true; } if (GN == 23) { my_flvPb.stop(); my_flvPb._visible = false; AsianSuckBack_mc._visible = false; VideoFlv = true; } if (!VideoFlv) { SuckVid[GN].stop(); SuckVid[GN]._visible = false; } break; case 2: if (GN == 1) { my_flvPb.stop(); my_flvPb._visible = false; BackFuckSuper_mc._visible = false; VideoFlv = true; } if (GN == 22) { my_flvPb.stop(); my_flvPb._visible = false; Back2GirlsFuck_mc._visible = false; VideoFlv = true; } if (GN == 23) { my_flvPb.stop(); my_flvPb._visible = false; AsianFuckBack_mc._visible = false; VideoFlv = true; } if (!VideoFlv) { FuckVid[GN].stop(); FuckVid[GN]._visible = false; } break; case 3: if (GN == 1) { my_flvPb.stop(); my_flvPb._visible = false; BackAnSuper_mc._visible = false; VideoFlv = true; } if (GN == 23) { my_flvPb.stop(); my_flvPb._visible = false; AsianAnalBack_mc._visible = false; VideoFlv = true; } if (!VideoFlv) { AnalVid[GN].stop(); AnalVid[GN]._visible = false; } } Room01_mc._visible = false; Room01_mc.Clock_mc.ArrowT_mc._rotation = 0; Katz_mc._visible = true; Roofs_mc._alpha = 20; EnterDoor = 6; } } if (EnterDoor == 6) { if (DarkCover_mc._alpha > 0) { DarkCover_mc._alpha -= 4; Roofs_mc._alpha += 4; } else { DarkCover_mc._alpha = 0; DarkCover_mc._visible = false; EnterDoor = 0; Roofs_mc._alpha == 100; } } }; Vitrina1_mc.onRelease = function () { if (Vitrina1_mc._visible && Vitrina1_mc._xscale == 600) { VDF = VitrinaMem; Pay_mc._visible = false; info_txt.text = ' '; cn = 0; } }; Pay_mc.Suck_btn.onRelease = function () { if (PriceSuck[GN] > 0) { if (MyBank >= PriceSuck[GN]) { FuckFlag = 1; MyBank -= PriceSuck[GN]; MyBank_txt.text = MyBank; coinsSound_mc.play(); if (K < 0) { DoorOpen_mc._x = Vitrina1_mc._x + 155; } else { DoorOpen_mc._x = Vitrina1_mc._x - 550; } if (K == 0) { DoorOpen_mc._x = Vitrina1_mc._x - 200; } DoorOpen_mc._y = Vitrina1_mc._y - 30; DoorOpen_mc._xscale = Vitrina1_mc._xscale; DoorOpen_mc._yscale = DoorOpen_mc._xscale; DoorOpen_mc._visible = true; DoorOpen_mc.play(); Pay_mc._visible = false; EnterDoor = 1; ++SuckTotal; ++FuckedTotal; ++GirlsDoneArr[GN]; FuckedTotal_txt.text = FuckedTotal; DoneCount = 0; j = 1; while (j <= GirlsQ) { if (GirlsDoneArr[j] > 0) { ++DoneCount; } ++j; } GilsDone = DoneCount; TotalGirls_txt.text = GilsDone + '/' + GirlsQ; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } } }; Pay_mc.Fuck_btn.onRelease = function () { if (PriceFuck[GN] > 0) { if (MyBank >= PriceFuck[GN]) { FuckFlag = 2; MyBank -= PriceFuck[GN]; MyBank_txt.text = MyBank; coinsSound_mc.play(); if (K < 0) { DoorOpen_mc._x = Vitrina1_mc._x + 155; } else { DoorOpen_mc._x = Vitrina1_mc._x - 550; } if (K == 0) { DoorOpen_mc._x = Vitrina1_mc._x - 200; } DoorOpen_mc._y = Vitrina1_mc._y - 30; DoorOpen_mc._xscale = Vitrina1_mc._xscale; DoorOpen_mc._yscale = DoorOpen_mc._xscale; DoorOpen_mc._visible = true; DoorOpen_mc.play(); Pay_mc._visible = false; EnterDoor = 1; ++PussyFuckTotal; ++FuckedTotal; ++GirlsDoneArr[GN]; FuckedTotal_txt.text = FuckedTotal; DoneCount = 0; j = 1; while (j <= GirlsQ) { if (GirlsDoneArr[j] > 0) { ++DoneCount; } ++j; } GilsDone = DoneCount; TotalGirls_txt.text = GilsDone + '/' + GirlsQ; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } } }; Pay_mc.Anal_btn.onRelease = function () { if (PriceAnal[GN] > 0) { if (MyBank >= PriceAnal[GN]) { FuckFlag = 3; MyBank -= PriceAnal[GN]; MyBank_txt.text = MyBank; coinsSound_mc.play(); if (K < 0) { DoorOpen_mc._x = Vitrina1_mc._x + 155; } else { DoorOpen_mc._x = Vitrina1_mc._x - 550; } if (K == 0) { DoorOpen_mc._x = Vitrina1_mc._x - 200; } DoorOpen_mc._y = Vitrina1_mc._y - 30; DoorOpen_mc._xscale = Vitrina1_mc._xscale; DoorOpen_mc._yscale = DoorOpen_mc._xscale; DoorOpen_mc._visible = true; DoorOpen_mc.play(); Pay_mc._visible = false; EnterDoor = 1; ++AnalFuckTotal; ++FuckedTotal; ++GirlsDoneArr[GN]; FuckedTotal_txt.text = FuckedTotal; DoneCount = 0; j = 1; while (j <= GirlsQ) { if (GirlsDoneArr[j] > 0) { ++DoneCount; } ++j; } GilsDone = DoneCount; TotalGirls_txt.text = GilsDone + '/' + GirlsQ; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } } }; VitrCasino_mc.onEnterFrame = function () { if (this._visible) { if (CasinoFlag) { if (this._xscale < 800) { this._xscale += Vscale; this._yscale = this._xscale; if (Roofs_mc._alpha > 0) { Roofs_mc._alpha -= 2; } if (this._xscale > 200) { Katz_mc._visible = false; } if (this.DoorCasino_mc._xscale > 10) { this.DoorCasino_mc._xscale -= 4; if (this.DoorCasino_mc.DoorShine_mc._alpha < 100) { this.DoorCasino_mc.DoorShine_mc._alpha += 4; } } if (this._xscale > 350) { this._y -= 20; } if (this.dark_mc._alpha < 100) { this.dark_mc._alpha += 4; } } else { this._visible = false; this.dark_mc._visible = false; this._xscale = 100; this._yscale = this._xscale; CasinoFlag = false; BlackJackFlag = true; Key.removeListener(myListener); gotoAndPlay('casinostart'); } } } }; VitrBilliard_mc.onEnterFrame = function () { if (this._visible) { if (BilliardFlag) { if (this._xscale < 800) { this._xscale += Vscale; this._yscale = this._xscale; if (Roofs_mc._alpha > 0) { Roofs_mc._alpha -= 2; } if (this._xscale > 200) { Katz_mc._visible = false; } if (this.DoorCasino_mc._xscale > 10) { this.DoorCasino_mc._xscale -= 4; if (this.DoorCasino_mc.DoorShine_mc._alpha < 100) { this.DoorCasino_mc.DoorShine_mc._alpha += 4; } } if (this._xscale > 350) { this._y -= 20; } if (this.dark_mc._alpha < 100) { this.dark_mc._alpha += 4; } } else { this._visible = false; this.dark_mc._visible = false; this._xscale = 100; this._yscale = this._xscale; BilliardFlag = false; PoolFlag = true; Key.removeListener(myListener); gotoAndPlay('billiardStart'); } } } }; VitrPoker_mc.onEnterFrame = function () { if (this._visible) { if (PokerFlag) { if (this._xscale < 800) { this._xscale += Vscale; this._yscale = this._xscale; if (Roofs_mc._alpha > 0) { Roofs_mc._alpha -= 2; } if (this._xscale > 200) { Katz_mc._visible = false; } if (this.DoorCasino_mc._xscale > 10) { this.DoorCasino_mc._xscale -= 4; if (this.DoorCasino_mc.DoorShine_mc._alpha < 100) { this.DoorCasino_mc.DoorShine_mc._alpha += 4; } } if (this._xscale > 350) { this._y -= 20; } if (this._xscale > 350) { this._x += 20; } if (this.dark_mc._alpha < 100) { this.dark_mc._alpha += 4; } } else { this._visible = false; this.dark_mc._visible = false; this._xscale = 100; this._yscale = this._xscale; PokerFlag = false; PokerPlayFlag = true; Key.removeListener(myListener); gotoAndPlay('pokerStart'); } } } }; Room01_mc.Clock_mc.onEnterFrame = function () { if (TimeOn) { ++ccAr; if (ccAr >= 25) { ccAr = 0; ++SecAr; this.ArrowT_mc._rotation += ArwIncr; if (SecAr == fucktime) { DarkCover_mc._visible = true; DarkCover_mc._alpha = 0; EnterDoor = 4; } if (SecAr >= fucktime + 1) { SecAr = 0; ccAr = 0; TimeOn = false; i = 1; while (i <= HouseQ) { Houses[i].Hit1_btn._visible = true; Houses[i].Hit2_btn._visible = true; ++i; } if (GilsDone >= GirlsQ) { if (!VictoryFlag) { Congrats_mc._visible = true; VictorySound_mc.play(); VictoryFlag = true; } } } } } }; Room01_mc.Exit_btn.onRelease = function () { if (TimeOn) { DarkCover_mc._visible = true; DarkCover_mc._alpha = 0; EnterDoor = 4; SecAr = 0; ccAr = 0; TimeOn = false; i = 1; while (i <= HouseQ) { Houses[i].Hit1_btn._visible = true; Houses[i].Hit2_btn._visible = true; ++i; } if (GilsDone >= GirlsQ) { if (!VictoryFlag) { Congrats_mc._visible = true; VictorySound_mc.play(); VictoryFlag = true; } } } }; help_btn.onRelease = function () { helpFlag = !helpFlag; if (helpFlag) { help_mc.gotoAndPlay('goCome'); Pause_Flag = true; } else { help_mc.gotoAndPlay('goOut'); Pause_Flag = false; } }; help_mc.onRelease = function () { helpFlag = false; Pause_Flag = false; if (helpFlag) { help_mc.gotoAndPlay('goCome'); } else { help_mc.gotoAndPlay('goOut'); } }; End_btn.onRelease = function () { gotoAndPlay('introPlay'); }; SoundOff_btn.onRelease = function () { this._visible = false; SoundMind = false; SoundOn_btn._visible = true; }; SoundOn_btn.onRelease = function () { this._visible = false; SoundMind = true; SoundOff_btn._visible = true; }; MoreGames_btn.onRelease = function () { getURL('http://gamcore.com', '_blank'); }; DarkCover_mc.onEnterFrame = function () { if (InitFlag) { if (this._alpha > 0) { this._alpha -= 4; } else { this._visible = false; InitFlag = false; } } }; Euro_mc.onEnterFrame = function () { var v2; v2 = fallFlag; if (fallFlag == 1) { if (this._y < Katz_mc._y + 10) { this._y += FallSpeed; } else { this._y = Katz_mc._y + 10; fallFlag = 2; } } if (fallFlag == 2) { this._visible = false; EuroP1_mc._x = this._x; EuroP1_mc._y = this._y; EuroP1_mc._visible = true; coinFallSound_mc.play(); fallFlag = 3; } if (fallFlag == 3) { ++fcc; if (fcc == 3) { if (EuroP1_mc._rotation == 40) { EuroP1_mc._rotation = -40; } else { EuroP1_mc._rotation = 40; } fcc = 0; ++fcQ; } if (fcQ == 8) { fallFlag = 4; fcc = 0; fcQ = 0; EuroP1_mc._rotation = 0; } } if (fallFlag == 5) { if (this._xscale < 120) { this._y -= 8; this._xscale += 4; this._yscale = this._xscale; } else { this._xscale = 120; this._yscale = this._xscale; fallFlag = 6; } } if (fallFlag == 6) { if (this._y < 600) { this._y += 10; if (this._x > MyBank_txt._x) { this._x -= 10; } if (this._xscale > 80) { this._xscale -= 2; this._yscale = this._xscale; } } else { this._xscale = 80; this._yscale = this._xscale; this._x = MyBank_txt._x; this._y = 600; this._visible = false; coinsSound_mc.play(); this._xscale = 100; this._yscale = this._xscale; MyBank += 10; MyBank_txt.text = MyBank; fallFlag = 7; } } }; EuroP1_mc.onRelease = function () { if (fallFlag == 4) { this._visible = false; Euro_mc._x = this._x; Euro_mc._y = this._y; Euro_mc._visible = true; LuzaSound_mc.play(); fallFlag = 5; } }; EuroP1_mc.onEnterFrame = function () { if (this.hitTest(Katz_mc)) { if (fallFlag == 4) { this._visible = false; Euro_mc._x = this._x; Euro_mc._y = this._y; Euro_mc._visible = true; LuzaSound_mc.play(); fallFlag = 5; } } }; ATMBig_mc.onEnterFrame = function () { if (this._visible) { if (ATMOpenFlag == 1) { if (this._xscale < 300) { this._xscale += Vscale; this._yscale = this._xscale; if (Roofs_mc._alpha > 0) { Roofs_mc._alpha -= 2; } if (this._xscale > 40) { Katz_mc._visible = false; } if (this._y < 470) { this._y += 10; } if (this.dark_mc._alpha < 100) { this.dark_mc._alpha += 4; } } else { this._xscale = 300; this._yscale = this._xscale; this._y = 470; DarkFon_mc._alpha = 100; District_mc._visible = false; ATMOpenFlag = 2; } } if (ATMOpenFlag == 3) { if (this._xscale > 25) { this._xscale -= Vscale; this._yscale = this._xscale; if (this._y > 350) { this._y -= 10; } } else { this._visible = false; this.dark_mc._visible = false; this._xscale = 25; this._yscale = this._xscale; DarkFon_mc._alpha = 0; ATMOpenFlag = 0; Katz_mc._visible = true; Roofs_mc._alpha = 100; } } } }; ATMBig_mc.Exit_btn.onRelease = function () { if (ATMOpenFlag == 2) { ATMOpenFlag = 3; ATMBig_mc.InsertCartTXT_mc._visible = true; DarkFon_mc._alpha = 80; District_mc._visible = true; ATMInit(); } }; cardOnPanel_mc.onRelease = function () { if (CardTakeFlag == 3) { if (ATMOpenFlag == 2) { CardUseFlag = 1; CCard_mc._x = cardOnPanel_mc._x; CCard_mc._y = cardOnPanel_mc._y; cardOnPanel_mc._visible = false; CCard_mc._visible = true; } else { bumpSnd_mc.play(); info_txt.text = 'No ATM!'; } } }; CCard_mc.onEnterFrame = function () { if (CardUseFlag == 1) { if (this._y > ATMBig_mc._y - 200) { this._y -= 10; if (this._xscale < 30) { this._xscale += 1; this._yscale = this._xscale; } if (this._x < 600) { this._x += 10; } } else { this._y = ATMBig_mc._y - 200; this._x = 600; this._xscale = 30; this._yscale = this._xscale; CardUseFlag = 2; } } if (CardUseFlag == 2) { this._visible = false; ATMBig_mc.cardInsert_mc._visible = true; ATMBig_mc.cardInsert_mc.gotoAndPlay(2); CardUseFlag = 3; } if (CardUseFlag == 21) { if (this._y < cardOnPanel_mc._y) { this._y += 10; if (this._xscale > 10) { this._xscale -= 1; this._yscale = this._xscale; } if (this._x > cardOnPanel_mc._x) { this._x -= 10; } } else { this._y = cardOnPanel_mc._y; this._x = cardOnPanel_mc._x; this._xscale = 10; this._yscale = this._xscale; this._visible = false; cardOnPanel_mc._visible = true; CardUseFlag = 0; if (ATMOpenFlag > 0) { ATMOpenFlag = 3; ATMBig_mc.InsertCartTXT_mc._visible = true; DarkFon_mc._alpha = 80; District_mc._visible = true; } } } }; ATMLogic_mc.onEnterFrame = function () { if (CardUseFlag == 4) { ATMBig_mc.cardInsert_mc._visible = false; ATMBig_mc.InsertCartTXT_mc._visible = false; ATMBig_mc.PinEnter_mc._visible = true; myPoint1.x = ATMBig_mc.cashMask_mc._x; myPoint1.y = ATMBig_mc.cashMask_mc._y; ATMBig_mc.localToGlobal(myPoint1); PinUpTXT_txt._x = myPoint1.x - 40; PinUpTXT_txt._y = myPoint1.y - 280; PinUpTXT_txt._visible = true; CardUseFlag = 5; } if (CardUseFlag == 5) { PinUpTXT_txt.text = PIN; if (PIN.length > 0) { ATMBig_mc.PinEnter_mc.Slash_mc._visible = false; } if (PIN.length == 4) { PinUpTXT_txt.text = '****'; } } if (CardUseFlag == 5.5) { CardUseFlag = 6; } if (CardUseFlag == 7) { myPoint1.x = ATMBig_mc.cashMask_mc._x; myPoint1.y = ATMBig_mc.cashMask_mc._y; ATMBig_mc.localToGlobal(myPoint1); Eur20Curr_mc._x = myPoint1.x + 20; Eur20Curr_mc._y = myPoint1.y - 75; ATMBig_mc.CashShtor_mc.gotoAndPlay(2); CardUseFlag = 8; } if (CardUseFlag == 8) { if (ATMBig_mc.CashShtor_mc._currentframe >= 10) { Eur20Curr_mc._visible = true; Eur20Curr_mc.gotoAndPlay(2); CardUseFlag = 9; } } if (CardUseFlag == 9) { if (Eur20Curr_mc._currentframe >= 42) { ATMBig_mc.TakeMonetTXT_mc._visible = false; ATMBig_mc.takeCardTXT_mc._visible = true; Eur20CashFall_mc._x = Eur20Curr_mc._x; Eur20CashFall_mc._y = Eur20Curr_mc._y + 15; Eur20Curr_mc._visible = false; Eur20CashFall_mc._visible = true; ATMBig_mc.CashShtor_mc.gotoAndPlay('shtorOpen'); CardUseFlag = 10; } } if (CardUseFlag == 10) { if (Eur20CashFall_mc._x > MyBank_txt._x) { Eur20CashFall_mc._x -= 8; Eur20CashFall_mc._xscale -= 2; Eur20CashFall_mc._yscale = Eur20CashFall_mc._xscale; } if (Eur20CashFall_mc._y < MyBank_txt._y) { Eur20CashFall_mc._y += 8; } else { Eur20CashFall_mc._visible = false; Eur20CashFall_mc._xscale = 100; Eur20CashFall_mc._yscale = Eur20CashFall_mc._xscale; MyBank += 20; MyBank_txt.text = MyBank; coinsSound_mc.play(); CardUseFlag = 11; } } if (CardUseFlag == 11) { ATMBig_mc.takeCardTXT_mc._visible = false; wtAT = 1; CardUseFlag = 17; } if (CardUseFlag == 17) { ++wtAT; if (wtAT >= 40) { CardUseFlag = 18; wtAT = 0; } } if (CardUseFlag == 18) { ATMBig_mc.cardInsert_mc._visible = true; ATMBig_mc.cardInsert_mc.gotoAndPlay('cardOut'); CardUseFlag = 19; } if (CardUseFlag == 20) { ATMBig_mc.cardInsert_mc._visible = false; CCard_mc._y = ATMBig_mc._y - 200; CCard_mc._x = 600; CCard_mc._xscale = 30; CCard_mc._yscale = CCard_mc._xscale; CCard_mc._visible = true; CardUseFlag = 21; ATMInit(); } }; ATMBig_mc.K1_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '1'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K2_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '2'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K3_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '3'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K4_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '4'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K5_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '5'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K6_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '6'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K7_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '7'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K8_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '8'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K9_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '9'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.K0_btn.onRelease = function () { if (CardUseFlag == 5 && !pinOver) { PinArr[PinN] = '0'; PIN = PIN + '' + PinArr[PinN]; ++PinN; if (PinN >= 4) { pinOver = true; } } }; ATMBig_mc.KS_btn.onRelease = function () {}; ATMBig_mc.KR_btn.onRelease = function () {}; ATMBig_mc.P5_btn.onRelease = function () { if (CardUseFlag == 5) { if (PIN.length == 4) { if (PIN == PinCorrect) { PinUpTXT_txt.text = ''; PinUpTXT_txt._visible = false; CardUseFlag = 5.5; ATMBig_mc.PinEnter_mc._visible = false; ATMBig_mc.SumEnterTXT_mc._visible = true; } else { ATMBig_mc.PinEnter_mc._visible = false; PinUpTXT_txt._visible = false; ATMBig_mc.incorrPIN_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } } } if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.SumIncorTXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } }; ATMBig_mc.P1_btn.onRelease = function () { if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.Only2050TXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } }; ATMBig_mc.P2_btn.onRelease = function () { if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; if (CCardTotal >= 20) { CCardTotal -= 20; ATMBig_mc.TakeMonetTXT_mc._visible = true; CardUseFlag = 7; } else { ATMBig_mc.SumIncorTXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } } }; ATMBig_mc.P3_btn.onRelease = function () { if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.SumIncorTXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } }; ATMBig_mc.P4_btn.onRelease = function () { if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.SumIncorTXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } }; ATMBig_mc.P6_btn.onRelease = function () { if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.SumIncorTXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } }; ATMBig_mc.P7_btn.onRelease = function () { if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.SumIncorTXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } }; ATMBig_mc.P8_btn.onRelease = function () { if (CardUseFlag == 6) { ATMBig_mc.SumEnterTXT_mc._visible = false; ATMBig_mc.SumIncorTXT_mc._visible = true; ATMBig_mc.takeCardTXT_mc._visible = true; CardUseFlag = 17; } }; Congrats_mc.onEnterFrame = function () { if (this._visible) { ++Yo; if (Yo < 100) { ++this._xscale; this._yscale = this._xscale; } if (Yo > 100) { --this._xscale; this._yscale = this._xscale; } if (Yo >= 199) { this._xscale = 100; this._yscale = this._xscale; this._visible = false; Yo = 0; } } }; District_mc.LuckOpen_mc.onEnterFrame = function () { if (this.hitTest(Katz_mc.Contact_mc)) { if (!winFlag) { Katz_mc._visible = false; this.gotoAndPlay(2); winFlag = true; moveFlag = false; } } if (LuckFallFlag && FallTonnelFlag == 0) { FallTonnelFlag = 1; tonnell_mc.RatEyes_mc._visible = false; SoundOops_mc.play(); } if (FallTonnelFlag >= 1) { tonnell_mc._visible = true; tonnell_mc.BricksTonnel_mc._y -= 16; tonnell_mc.RatEyes_mc._y = tonnell_mc.BricksTonnel_mc._y + 610; if (tonnell_mc.BricksTonnel_mc._y <= -895) { tonnell_mc.BricksTonnel_mc._y = -300; ++FallTonnelFlag; tonnell_mc.RatEyes_mc._visible = true; if (tonnell_mc.RatEyes_mc._x < 0) { tonnell_mc.RatEyes_mc._x = 300; } else { tonnell_mc.RatEyes_mc._x = -300; } tonnell_mc.RatEyes_mc._y = tonnell_mc.BricksTonnel_mc._y + 610; tonnell_mc.RatEyes_mc._y += 40; } } if (FallTonnelFlag >= 5) { FallTonnelFlag = 0; afterTonnelFlag = true; gotoAndPlay('introPlay'); } }; var CueStr = ''; var CueNames = new Array(10); var CueTimes = new Array(10); var listenerObject1 = new Object(); listenerObject1.cuePoint = function (eventObject) { Testdata_mc.cues_txt.text = 'Cue: ' + eventObject.info.time + ' ' + eventObject.info.name; if (eventObject.info.time >= CueTimes[1]) { my_flvPb.seekToNavCuePoint(CueTimes[0]); } }; my_flvPb.addEventListener('cuePoint', listenerObject1); var listenerObject2 = new Object(); listenerObject2.metadataReceived = function (eventObject) { var v1 = 0; while (v1 < (my_flvPb.__get__metadata()).cuePoints.length) { CueNames[v1] = (my_flvPb.__get__metadata()).cuePoints[v1].name; CueTimes[v1] = (my_flvPb.__get__metadata()).cuePoints[v1].time; ++v1; } }; my_flvPb.addEventListener('metadataReceived', listenerObject2); } movieClip 206 { } movieClip 207 { } movieClip 210 { } movieClip 212 { } movieClip 214 { } movieClip 216 { } movieClip 218 { } movieClip 220 { } movieClip 221 { } movieClip 223 { } movieClip 225 { } movieClip 227 { } movieClip 229 { } movieClip 231 { } movieClip 233 { } movieClip 235 { } movieClip 237 { } movieClip 239 { } movieClip 241 { } movieClip 243 { } movieClip 245 { } movieClip 247 { } movieClip 250 { } movieClip 252 { } movieClip 254 { } movieClip 258 { } movieClip 261 { } movieClip 264 { } movieClip 267 { } movieClip 270 { } movieClip 274 { } movieClip 277 { } movieClip 280 { } movieClip 284 { } movieClip 287 { } movieClip 290 { } movieClip 293 { } movieClip 303 { } // unknown tag 88 length 146 movieClip 309 { } movieClip 313 { } movieClip 316 { } movieClip 318 { } movieClip 320 { } // unknown tag 88 length 197 movieClip 329 { } movieClip 333 { } movieClip 334 { } movieClip 338 { } movieClip 341 { } movieClip 367 { frame 1 { stop(); } frame 33 { _root.LuckFallFlag = true; } frame 40 { stop(); } } movieClip 368 { } movieClip 386 { } movieClip 389 { } movieClip 392 { } movieClip 393 { } movieClip 399 { } movieClip 401 { } movieClip 402 { } movieClip 453 { } movieClip 454 { } movieClip 471 { } movieClip 564 { } movieClip 675 { } movieClip 738 { } movieClip 740 { frame 102 { } frame 110 { gotoAndPlay(1); } } movieClip 742 { frame 135 { gotoAndPlay('C1'); } } movieClip 744 { frame 219 { } frame 243 { } frame 267 { } frame 273 { gotoAndPlay('C01'); } } movieClip 746 { frame 226 { gotoAndPlay('C3'); } } movieClip 829 { } movieClip 831 { frame 78 { gotoAndPlay('C2'); } } movieClip 874 { } movieClip 939 { } movieClip 941 { } movieClip 982 { frame 1 { var cycSuck = 0; } frame 41 { ++cycSuck; if (cycSuck < 10) { gotoAndPlay('C3'); } else { cycSuck = 0; } } } movieClip 1031 { } movieClip 1087 { frame 105 { gotoAndPlay('C4'); } } movieClip 1089 { frame 1 { var cnt = 0; } frame 10 { ++cnt; if (cnt > 1) { gotoAndPlay('C1'); } if (cnt > 20) { cnt = 0; } } frame 35 { } frame 39 { } frame 63 { gotoAndPlay('C2'); } } movieClip 1091 { } movieClip 1093 { frame 1 { var cnt = 0; } frame 12 { ++cnt; if (cnt < 10) { gotoAndPlay('C11'); } else {} } frame 22 { } frame 23 { } frame 151 { gotoAndPlay(1); } } movieClip 1144 { } movieClip 1235 { } movieClip 1264 { } movieClip 1266 { frame 178 { gotoAndPlay(1); } } movieClip 1299 { } movieClip 1301 { frame 153 { gotoAndPlay('C1'); } } movieClip 1405 { frame 90 { gotoAndPlay('C3'); } frame 96 { } } movieClip 1407 { frame 35 { gotoAndPlay(1); } } movieClip 1409 { frame 57 { gotoAndPlay('C3'); } frame 68 { } } movieClip 1459 { frame 20 { gotoAndPlay('C3'); } frame 39 { } frame 45 { gotoAndPlay('C0'); } } movieClip 1465 { frame 121 { gotoAndPlay(2); } } movieClip 1510 { } movieClip 1567 { } movieClip 1598 { } movieClip 1601 { } movieClip 1604 { } movieClip 1607 { } movieClip 1610 { } movieClip 1613 { } movieClip 1616 { } movieClip 1619 { } movieClip 1622 { } instance my_flvPb of movieClip 9 FLVPlayback { onClipEvent (construct) { autoPlay = true; autoRewind = true; autoSize = false; bufferTime = 0.1; contentPath = ''; cuePoints = ['t', 0, 'n', 'start1', 't', 2, 'd', 0, 'p', 0, 't', 20000, 'n', 'jump1', 't', 2, 'd', 0, 'p', 0, 't', 25000, 'n', 'jumpTo', 't', 2, 'd', 0, 'p', 0, 't', 55000, 'n', 'end1', 't', 2, 'd', 0, 'p', 0]; isLive = false; maintainAspectRatio = true; skin = ''; skinAutoHide = false; totalTime = 0; version_1_0_1 = ''; volume = 100; } } movieClip 1624 { } movieClip 1626 { } movieClip 1629 { } movieClip 1635 { } movieClip 1636 { } movieClip 1639 { } movieClip 1640 { } movieClip 1641 { } movieClip 1642 { } movieClip 1644 { } movieClip 1645 { } movieClip 1647 { } movieClip 1649 { } movieClip 1650 { } movieClip 1652 { } movieClip 1654 { } movieClip 1655 { } movieClip 1657 { } movieClip 1658 { } movieClip 1660 { } movieClip 1662 { } movieClip 1663 { } movieClip 1665 { } movieClip 1666 { } movieClip 1668 { } movieClip 1670 { } movieClip 1671 { } movieClip 1672 { } movieClip 1673 { } // unknown tag 88 length 148 movieClip 1678 { } movieClip 1680 { } movieClip 1682 { } movieClip 1684 { } movieClip 1686 { } movieClip 1687 { } movieClip 1689 { } movieClip 1694 { } movieClip 1696 { } movieClip 1697 { } movieClip 1698 { } movieClip 1727 { } movieClip 1732 { } movieClip 1739 { } // unknown tag 88 length 67 // unknown tag 88 length 99 movieClip 1787 { } movieClip 1792 { } movieClip 1793 { } movieClip 1795 { } movieClip 1806 { } movieClip 1808 { } movieClip 1811 { } movieClip 1814 { } movieClip 1816 { } movieClip 1819 { frame 1 { stop(); } frame 40 { _root.CardUseFlag = 4; stop(); } frame 79 { _root.CardUseFlag = 20; stop(); } } movieClip 1821 { } movieClip 1831 { frame 1 { stop(); } frame 10 { stop(); } } movieClip 1832 { frame 1 { cardInsert_mc.setMask(CardMask_mc); } } movieClip 1841 { frame 1 { stop(); } } movieClip 1842 { } movieClip 1872 { frame 1 { stop(); } frame 20 { gotoAndStop(1); } } movieClip 1873 { } movieClip 1874 { } movieClip 1875 { } movieClip 1878 { } movieClip 1904 { } movieClip 1907 { } movieClip 1933 { } movieClip 1950 { } movieClip 1966 { } movieClip 1967 { } movieClip 1969 { } movieClip 1972 { } movieClip 1974 { } movieClip 1976 { } movieClip 1978 { } movieClip 1979 { } movieClip 1981 { } movieClip 1984 { } movieClip 1990 { } movieClip 1992 { } movieClip 1994 { } // unknown tag 88 length 149 movieClip 2040 { } movieClip 2046 { } movieClip 2049 { } movieClip 2052 { } movieClip 2053 { } movieClip 2055 { frame 1 { stop(); } } movieClip 2057 { frame 1 { stop(); } } movieClip 2059 { frame 1 { stop(); } frame 4 { } } movieClip 2061 { frame 1 { stop(); } frame 47 { gotoAndStop(1); } } movieClip 2063 { frame 1 { stop(); } } movieClip 2065 { frame 1 { stop(); } } movieClip 2067 { frame 1 { stop(); } } movieClip 2069 { frame 1 { stop(); } } movieClip 2070 { frame 1 { stop(); } } movieClip 2071 { frame 1 { stop(); } } frame 5 { function initset() { newFlag = false; giveCards = false; q = 0; q1 = 0; openCards = false; wwt = 0; ww = 0; swt2 = 0; j = 1; while (j <= cardquant) { kolodaAr[j] = true; usecolodAr[j] = j; MoveFlag[j] = false; DestX[j] = 0; DestY[j] = 0; ShowCard[j] = false; ++j; } razdFlag = false; afterRazd = false; cardquant = 52; h = 1; m = 1; N = 1; initFlag = true; firstSet = false; cardqnt_txt.text = cardquant; VictorySound_mc.gotoAndStop('StopSound'); rules_mc._visible = false; GameOver_txt._visible = false; YouLose_mc._visible = false; TotalGirls_txt.text = GilsDone + '/' + GirlsQ; colodaquant = cardquant; OppCnt = 0; MyCnt = 0; IWin = 0; newFlag = false; kolodaFlag = false; dealerPlay = false; dealerMove = false; decide = false; dealerStand = false; HitFlag = false; OppBank_txt.text = OppBank; MoreHer_btn._visible = false; PlayMore_btn._visible = false; YouBust_mc._visible = false; DealerBust_mc._visible = false; YouWinSet_mc._visible = false; DealerWinSet_mc._visible = false; PushSet_mc._visible = false; BlackJack_mc._visible = false; Next_btn._visible = false; NextLevel_mc._visible = false; LevelDown_mc._visible = false; Stand_btn._visible = false; Hit_btn._visible = false; S20_btn._visible = true; S50_btn._visible = true; S100_btn._visible = true; Deal_btn._visible = true; Fold_btn._visible = false; BetShine_mc._visible = true; MyCnt_txt.text = 0; OppCnt_txt.text = 0; MyBet = 0; MyBet_txt.text = MyBet; MyBank_txt.text = MyBank; MyTuz11 = 0; OppTuz11 = 0; OppBackN = 3; timeToStand = false; BlackJackTwice = false; randomarray(); var v1 = 0; var v2 = 0; i = 1; while (i <= cardquant) { kolodaOst[i] = koloda[RND[i]]; kolodaOst[i].cacheAsBitmap = true; kolodaOst[i]._visible = false; kolodaOst[i]._x = CardPoint3_mc._x; kolodaOst[i]._y = CardPoint3_mc._y + i * 4; cardval = RND[i] % 13; if (cardval == 0) { cardval = 13; } takemast = Math.floor(RND[i] / 13) + 1; kolodaOst[i].VALUE = cardValueAr[cardval - 1]; kolodaOst[i].MAST = takemast; cardBack[i] = card1_mc.duplicateMovieClip('cardB' + i, 100 + i); cardBack[i].cacheAsBitmap = true; ++i; } p = 1; i = 1; while (i <= 52) { if (kolodaOst[i].VALUE <= 5) { LowCards[p] = kolodaOst[i]; LowCards[p].NUM = i; ++p; } ++i; } i = 5; while (i <= 8) { rnd = randRange(5, 8); if (i != rnd) { kolodaOst[LowCards[i].NUM] = kolodaOst[i]; kolodaOst[i] = LowCards[i]; } ++i; } colodaquant = cardquant; } function randomarray() { var v3 = new Array(ArrLim); var v5 = ArrLim; var v4; var v2; var v1; v2 = 1; while (v2 <= ArrLim) { v3[v2] = v2; ++v2; } v2 = 1; while (v2 <= ArrLim) { v4 = randRange(1, v5); RND[v2] = v3[v4]; --v5; v1 = v4; while (v1 < ArrLim) { v3[v1] = v3[v1 + 1]; ++v1; } ++v2; } } function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } if (!BlackJackFlag) { gotoAndPlay('introPlay'); } var LEVEL = 1; var VictoryLevel = 7; var MoveFlag = new Array(53); var DestX = new Array(53); var DestY = new Array(53); var ShowCard = new Array(53); var LowCards = new Array(53); var spd = 8; var OppCnt = 0; var MyCnt = 0; var HitFlag = false; var dealerPlay = false; var dealerMove = false; var MyTuz11 = 0; var OppTuz11 = 0; var OppBank = 250; var OppBankInit = 250; var MyBet = 0; var IWin = 0; var OppBackN = 3; var decide = false; var dealerStand = false; var rnd = 1; var LevChngFlag = false; var DeltaV = 0; var NMind = 0; var take; var newcard; var mst; var takemast; var cardval; var testY = 0; var changeFlag = 0; var ShtorFlag = false; var wtFlag = false; var helpFlag = false; var initFlag = true; var razdFlag = false; var kozyrFlag = true; var scoreHer = 0; var scoreMy = 0; var GameOver = false; var TupoFlag = false; var r = 13; var j; var i = 1; var N = 1; var m = 1; var h = 1; var k; var q; var p; var kolodaOst = new Array(); var kolodaAr = new Array(); var usecolodAr = new Array(); var cardquant = 52; var colodaquant; var cardAr = new Array(); var cardnamesAr = new Array('A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'); var cardValueAr = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10); var mastAr = new Array(); var Playcard = new Array(); var cardBack = new Array(); var HerCardBack = new Array(); var MycardBack = new Array(); var MyAct = new Array(); var HerAct = new Array(); var KozyrMast; var KozyrVal; var mastnames = new Array(); mastnames[1] = bubna_mc; mastnames[2] = cherva_mc; mastnames[3] = pika_mc; mastnames[4] = trefa_mc; var HerCardsX = new Array(); var HisMast = new Array(); var HisValue = new Array(); var MyMast = new Array(); var MyValue = new Array(); var MyPlayMast; var MyPlayValue; var MycardAr = new Array(); var girlArr = new Array(); var koloda = new Array(53); koloda[1] = bubnaA_mc; koloda[2] = bubna2_mc; koloda[3] = bubna3_mc; koloda[4] = bubna4_mc; koloda[5] = bubna5_mc; koloda[6] = bubna6_mc; koloda[7] = bubna7_mc; koloda[8] = bubna8_mc; koloda[9] = bubna9_mc; koloda[10] = bubna10_mc; koloda[11] = bubnaJ_mc; koloda[12] = bubnaQ_mc; koloda[13] = bubnaK_mc; koloda[14] = ChervaA_mc; koloda[15] = Cherva2_mc; koloda[16] = Cherva3_mc; koloda[17] = Cherva4_mc; koloda[18] = Cherva5_mc; koloda[19] = Cherva6_mc; koloda[20] = Cherva7_mc; koloda[21] = Cherva8_mc; koloda[22] = Cherva9_mc; koloda[23] = Cherva10_mc; koloda[24] = ChervaJ_mc; koloda[25] = ChervaQ_mc; koloda[26] = ChervaK_mc; koloda[27] = PikaA_mc; koloda[28] = Pika2_mc; koloda[29] = Pika3_mc; koloda[30] = Pika4_mc; koloda[31] = Pika5_mc; koloda[32] = Pika6_mc; koloda[33] = Pika7_mc; koloda[34] = Pika8_mc; koloda[35] = Pika9_mc; koloda[36] = Pika10_mc; koloda[37] = PikaJ_mc; koloda[38] = PikaQ_mc; koloda[39] = PikaK_mc; koloda[40] = TrefaA_mc; koloda[41] = Trefa2_mc; koloda[42] = Trefa3_mc; koloda[43] = Trefa4_mc; koloda[44] = Trefa5_mc; koloda[45] = Trefa6_mc; koloda[46] = Trefa7_mc; koloda[47] = Trefa8_mc; koloda[48] = Trefa9_mc; koloda[49] = Trefa10_mc; koloda[50] = TrefaJ_mc; koloda[51] = TrefaQ_mc; koloda[52] = TrefaK_mc; i = 1; while (i <= cardquant) { koloda[i]._visible = false; ++i; } levelUp_mc.setMask(levMask_mc); var afterRazd = false; var kolodaFlag = false; var d = 2; var HiLo = false; var herHiLo = false; var sravFlag = false; var herSravFlag = false; var choseGuess = false; var guess = false; var herGuess = false; var Ugadala = false; var turnCard = 0; var herTurn = 0; var newFlag = false; var delCards = false; var giveCards = false; var q = 0; var q1 = 0; var openCards = false; var ww = 1; var wwt = 0; var Yo = 0; var ArrLim = 52; var RND = new Array(53); var Display = new Array(53); var timeToStand = false; var BlackJackTwice = false; cardOnPanel_mc._visible = false; if (CardTakeFlag == 3) { cardOnPanel_mc._visible = true; } YouWin_mc._visible = false; YouWin_mc.stop(); if (SoundMind) { SoundOn_btn._visible = false; } if (LEVEL == VictoryLevel) { YouWin_mc._visible = true; } levelUp_mc.level_txt.text = LEVEL; FuckedTotal_txt.text = FuckedTotal; if (CardHidePlace == 1) { CCard_mc._visible = true; } else { CCard_mc._visible = false; } initset(); stop(); Move_mc.onEnterFrame = function () { i = 1; while (i <= 52) { if (MoveFlag[i]) { if (!kolodaOst[i].hitTest(DestX[i], DestY[i], true)) { if (kolodaOst[i]._x < DestX[i]) { kolodaOst[i]._x += spd; cardBack[i]._x = kolodaOst[i]._x; } if (kolodaOst[i]._y < DestY[i]) { kolodaOst[i]._y += spd; } if (kolodaOst[i]._y > DestY[i]) { kolodaOst[i]._y -= spd; } cardBack[i]._y = kolodaOst[i]._y; } if (kolodaOst[i].hitTest(DestX[i], DestY[i], true)) { kolodaOst[i]._x = DestX[i]; kolodaOst[i]._y = DestY[i]; cardBack[i]._x = kolodaOst[i]._x; cardBack[i]._y = kolodaOst[i]._y; MoveFlag[i] = false; if (ShowCard[i]) { cardBack[i]._visible = false; kolodaOst[i]._visible = true; } if (DestY[i] == CardPoint1_mc._y) { if (MyTuz11 == 0) { if (kolodaOst[i].VALUE == 1) { kolodaOst[i].VALUE = 11; MyTuz11 = 1; } } MyCnt = kolodaOst[i].VALUE + MyCnt; MyCnt_txt.text = MyCnt; HitFlag = true; if (MyCnt > 21) { if (MyTuz11 == 1) { MyCnt -= 10; MyCnt_txt.text = MyCnt; MyTuz11 = 2; } } if (MyCnt > 21) { YouBust_mc._visible = true; timeToStand = false; SoundOops_mc.play(); HitFlag = false; IWin = 2; ++wwt; } if (MyCnt == 21) { YouWinSet_mc._visible = true; BlackJack_mc._visible = true; soundOK_mc.play(); HitFlag = false; timeToStand = false; IWin = 1; BlackJackTwice = true; ++wwt; } } if (DestY[i] == CardPoint2_mc._y) { if (OppTuz11 == 0) { if (kolodaOst[i].VALUE == 1) { kolodaOst[i].VALUE = 11; OppTuz11 = 1; } } if (ShowCard[i]) { OppCnt = kolodaOst[i].VALUE + OppCnt; OppCnt_txt.text = OppCnt; } if (OppCnt > 21) { if (OppTuz11 == 1) { OppCnt -= 10; OppCnt_txt.text = OppCnt; OppTuz11 = 2; } } if (OppCnt > 21) { DealerBust_mc._visible = true; soundOK_mc.play(); dealerPlay = false; IWin = 1; ++wwt; } } } } ++i; } }; Dealer_mc.onEnterFrame = function () { if (dealerPlay) { HitFlag = false; if (!dealerStand) { if (dealerMove) { dealerMove = false; if (OppCnt < 21) { cardAr[q1] = kolodaOst[N]; NMind = N; DestX[N] = CardPoint2_mc._x + (q1 - 1) * 62; DestY[N] = CardPoint2_mc._y; ShowCard[N] = true; kolodaOst[N].Numi = q1; MoveFlag[N] = true; ++N; ++q1; --cardquant; cardqnt_txt.text = cardquant; } } if (!MoveFlag[NMind]) { decide = true; } if (decide) { if (OppCnt < 17) { decide = false; dealerMove = true; } else { dealerStand = true; if (MyCnt > OppCnt) { YouWinSet_mc._visible = true; soundOK_mc.play(); IWin = 1; wwt = 1; } if (MyCnt < OppCnt) { if (OppCnt <= 21) { DealerWinSet_mc._visible = true; } if (OppCnt == 21) { BlackJack_mc._visible = true; } SoundOops_mc.play(); IWin = 2; wwt = 1; } if (MyCnt == OppCnt) { PushSet_mc._visible = true; IWin = 0; wwt = 1; } } } } } }; timer_mc.onEnterFrame = function () { if (wwt > 0) { ++wwt; if (wwt > 50) { wwt = 0; Next_btn._visible = true; if (IWin == 0) { MyBank = MyBank; MyBank_txt.text = MyBank; OppBank = OppBank; OppBank_txt.text = OppBank; } if (IWin == 1) { MyBank += MyBet; OppBank -= MyBet; if (BlackJackTwice) { MyBank += MyBet; OppBank -= MyBet; } MyBank_txt.text = MyBank; OppBank_txt.text = OppBank; coinsSound_mc.play(); if (OppBank <= 0) { YouWin_mc._visible = true; YouWin_mc.play(); Next_btn._visible = false; } } if (IWin == 2) { MyBank -= MyBet; MyBank_txt.text = MyBank; OppBank += MyBet; OppBank_txt.text = OppBank; OopsSnd2_mc.play(); if (MyBank < 0) { if (LEVEL > 1) { --LEVEL; LevChngFlag = true; LevelDown_mc._visible = true; SoundOops_mc.play(); } } } IWin = 0; MyBet = 0; MyBet_txt.text = MyBet; } } }; newCards_mc.onEnterFrame = function () { if (newFlag) { if (swt2 > 0) { ++swt2; if (swt2 > 10) { swt2 = 0; q1 = 1; q = 1; giveCards = true; ww2 = 0; } } if (giveCards) { ++ww2; if (ww2 >= 6) { ww2 = 0; kolodaOst[N].Numi = q1; cardAr[q1] = kolodaOst[N]; MoveFlag[N] = true; DestX[N] = CardPoint2_mc._x + (q1 - 1) * 62; DestY[N] = CardPoint2_mc._y; ++q1; if (N == 1) { ShowCard[N] = true; } ++N; --cardquant; cardqnt_txt.text = cardquant; kolodaOst[N].Numi = q; MycardAr[q] = kolodaOst[N]; MoveFlag[N] = true; DestX[N] = CardPoint1_mc._x + (q - 1) * 62; DestY[N] = CardPoint1_mc._y; ShowCard[N] = true; MycardAr[q]._visible = true; ++N; --cardquant; cardqnt_txt.text = cardquant; ++q; if (N >= 4) { giveCards = false; timeToStand = true; Stand_btn._visible = true; Hit_btn._visible = true; Fold_btn._visible = true; } } } } }; koloda_mc.onEnterFrame = function () { if (kolodaFlag) { if (colodaquant > 0) { kolodaOst[N]._x = CardPoint3_mc._x + N * 8; kolodaOst[N]._y = CardPoint3_mc._y; cardBack[N]._x = kolodaOst[N]._x; cardBack[N]._y = kolodaOst[N]._y; ++N; --colodaquant; cardqnt_txt.text = colodaquant; } else { afterRazd = true; } if (afterRazd) { afterRazd = false; kolodaFlag = false; newFlag = true; Stand_btn._visible = true; Hit_btn._visible = true; Fold_btn._visible = true; swt2 = 1; N = 1; } } }; Fold_btn.onRelease = function () { if (HitFlag) { if (q <= 3) { MycardAr[1].removeMovieClip(); MycardAr[2].removeMovieClip(); q = 1; MycardAr[q] = kolodaOst[N]; kolodaOst[N].Numi = q; DestX[N] = CardPoint1_mc._x + (q - 1) * 62; DestY[N] = CardPoint1_mc._y; ShowCard[N] = true; MycardAr[q]._visible = true; MoveFlag[N] = true; ++N; --cardquant; cardqnt_txt.text = cardquant; ++q; MycardAr[q] = kolodaOst[N]; kolodaOst[N].Numi = q; DestX[N] = CardPoint1_mc._x + (q - 1) * 62; DestY[N] = CardPoint1_mc._y; ShowCard[N] = true; MycardAr[q]._visible = true; MoveFlag[N] = true; ++N; --cardquant; cardqnt_txt.text = cardquant; ++q; cardAr[1].removeMovieClip(); cardAr[2].removeMovieClip(); q1 = 1; kolodaOst[N].Numi = q1; cardAr[q1] = kolodaOst[N]; MoveFlag[N] = true; DestX[N] = CardPoint2_mc._x + (q1 - 1) * 62; DestY[N] = CardPoint2_mc._y; if (q1 == 1) { ShowCard[N] = true; } ++q1; ++N; --cardquant; cardqnt_txt.text = cardquant; kolodaOst[N].Numi = q1; cardAr[q1] = kolodaOst[N]; MoveFlag[N] = true; DestX[N] = CardPoint2_mc._x + (q1 - 1) * 62; DestY[N] = CardPoint2_mc._y; ++q1; ++N; --cardquant; cardqnt_txt.text = cardquant; cardBack[3].removeMovieClip(); HitFlag = false; MyCnt = 0; MyCnt_txt.text = MyCnt; OppCnt = 0; OppCnt_txt.text = OppCnt; MyBet /= 2; MyBet_txt.text = MyBet; MyBank -= MyBet; OppBank += MyBet; MyBank_txt.text = MyBank; OppBank_txt.text = OppBank; MyTuz11 = 0; OppTuz11 = 0; OppBackN = 8; Fold_btn._visible = false; } } }; Hit_btn.onRelease = function () { if (HitFlag) { MycardAr[q] = kolodaOst[N]; kolodaOst[N].Numi = q; DestX[N] = CardPoint1_mc._x + (q - 1) * 62; DestY[N] = CardPoint1_mc._y; ShowCard[N] = true; MycardAr[q]._visible = true; MoveFlag[N] = true; ++N; --cardquant; cardqnt_txt.text = cardquant; ++q; Fold_btn._visible = false; HitFlag = false; } }; Stand_btn.onRelease = function () { if (timeToStand) { timeToStand = false; dealerPlay = true; decide = true; cardBack[OppBackN]._visible = false; kolodaOst[OppBackN]._visible = true; OppCnt = kolodaOst[OppBackN].VALUE + OppCnt; OppCnt_txt.text = OppCnt; Fold_btn._visible = false; } }; S20_btn.onRelease = function () { if (this._visible) { MyBet = 10; MyBet_txt.text = MyBet; BetShine_mc._visible = false; info_txt.text = ' '; } }; S50_btn.onRelease = function () { if (this._visible) { MyBet = 20; MyBet_txt.text = MyBet; BetShine_mc._visible = false; info_txt.text = ' '; } }; S100_btn.onRelease = function () { if (this._visible) { MyBet = 50; MyBet_txt.text = MyBet; BetShine_mc._visible = false; info_txt.text = ' '; } }; Deal_btn.onRelease = function () { if (MyBet > 0 && MyBet <= MyBank) { MyBet_txt.text = MyBet; MyBank_txt.text = MyBank; OppBank_txt.text = OppBank; this._visible = false; S20_btn._visible = false; S50_btn._visible = false; S100_btn._visible = false; BetShine_mc._visible = false; kolodaFlag = true; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } }; Next_btn.onRelease = function () { j = 1; while (j <= 52) { cardBack[j].removeMovieClip(); ++j; } changeGirlFlag = true; girlNum = 1; initset(); }; PlayMore_btn.onRelease = function () { L = kolodaOst.length; j = 1; while (j <= L) { kolodaOst[j].removeMovieClip(); ++j; } j = 1; while (j <= 52) { cardBack[j].removeMovieClip(); ++j; } changeGirlFlag = true; girlNum = 1; LEVEL = 1; gotoAndPlay('introPlay'); }; var levCng = false; var memY = levelUp_mc.level_txt._y; var Licr = 2; levelUp_mc.onEnterFrame = function () { if (levOld != LEVEL) { this.levelN_txt.text = LEVEL; levCng = true; if (LEVEL > levOld) { Licr = 2; } else { Licr = -2; this.levelN_txt._y = this.level_txt._y - 30; } } if (levCng) { this.level_txt._y -= Licr; this.levelN_txt._y -= Licr; if (Licr > 0) { if (this.levelN_txt._y <= memY) { this.level_txt.text = LEVEL; this.level_txt._y = memY; this.levelN_txt._y = this.level_txt._y + 30; levCng = false; levOld = LEVEL; } } else { if (this.levelN_txt._y >= memY) { this.level_txt.text = LEVEL; this.level_txt._y = memY; this.levelN_txt._y = this.level_txt._y + 30; levCng = false; levOld = LEVEL; } } } }; YouWin_mc.onEnterFrame = function () { if (this._visible) { if (Yo < 200) { ++Yo; } if (Yo < 100) { this.play(); } if (Yo >= 199) { this._visible = false; } } }; DarkFon_mc.onEnterFrame = function () { if (this._alpha > 0) { this._alpha -= 4; } else { this._visible = false; this._alpha = 100; } }; Help_btn.onRelease = function () { helpFlag = !helpFlag; if (helpFlag) { help_mc.gotoAndPlay('goCome'); } else { help_mc.gotoAndPlay('goOut'); } }; help_mc.onRelease = function () { helpFlag = false; if (helpFlag) { help_mc.gotoAndPlay('goCome'); } else { help_mc.gotoAndPlay('goOut'); } }; End_btn.onRelease = function () { j = 1; while (j <= 52) { cardBack[j].removeMovieClip(); ++j; } BlackJackFlag = false; gotoAndPlay('introPlay'); }; Exit_btn.onRelease = function () { j = 1; while (j <= 52) { cardBack[j].removeMovieClip(); ++j; } BlackJackFlag = false; ReturnFlag = true; MyBank_txt.text = MyBank; gotoAndPlay('maincyc'); }; SoundOff_btn.onRelease = function () { this._visible = false; SoundMind = false; SoundOn_btn._visible = true; }; SoundOn_btn.onRelease = function () { this._visible = false; SoundMind = true; SoundOff_btn._visible = true; }; MoreGames_btn.onRelease = function () { getURL('http://gamcore.com', '_blank'); }; CCard_mc.onRelease = function () { if (CardTakeFlag == 0) { LuzaSound_mc.play(); CardTakeFlag = 1; CardHidePlace = 0; } }; var CcrdDx; var CcrdDy; CCard_mc.onEnterFrame = function () { if (CardTakeFlag == 1) { if (this._xscale < 20) { this._y -= 8; this._xscale += 1; this._yscale = this._xscale; } else { this._xscale = 20; this._yscale = this._xscale; CcrdDx = (this._x - cardOnPanel_mc._x) / 25; CcrdDy = (cardOnPanel_mc._y - this._y) / 25; CardTakeFlag = 2; } } if (CardTakeFlag == 2) { if (this._y < 600) { this._y += CcrdDy; if (this._x > cardOnPanel_mc._x) { this._x -= CcrdDx; } if (this._xscale > 10) { this._xscale -= 2; this._yscale = this._xscale; } } else { this._xscale = 10; this._yscale = this._xscale; this._x = cardOnPanel_mc._x; this._y = cardOnPanel_mc._y; this._visible = false; this._xscale = 10; this._yscale = this._xscale; cardOnPanel_mc._visible = true; CardTakeFlag = 3; } } }; } movieClip 2073 { } movieClip 2076 { } movieClip 2080 { frame 1 { var VALUE; var MAST; } } movieClip 2083 { frame 1 { var VALUE; var MAST; } } movieClip 2086 { frame 1 { var VALUE; var MAST; } } movieClip 2089 { frame 1 { var VALUE; var MAST; } } movieClip 2093 { frame 1 { var VALUE; var MAST; } } movieClip 2096 { frame 1 { var VALUE; var MAST; } } movieClip 2099 { frame 1 { var VALUE; var MAST; } } movieClip 2102 { frame 1 { var VALUE; var MAST; } } movieClip 2105 { frame 1 { var VALUE; var MAST; } } movieClip 2108 { frame 1 { var VALUE; var MAST; } } movieClip 2112 { frame 1 { var VALUE; var MAST; } } movieClip 2117 { frame 1 { var VALUE; var MAST; } } movieClip 2122 { frame 1 { var VALUE; var MAST; } } movieClip 2124 { frame 1 { var VALUE; var MAST; } } movieClip 2126 { frame 1 { var VALUE; var MAST; } } movieClip 2128 { frame 1 { var VALUE; var MAST; } } movieClip 2130 { frame 1 { var VALUE; var MAST; } } movieClip 2132 { frame 1 { var VALUE; var MAST; } } movieClip 2134 { frame 1 { var VALUE; var MAST; } } movieClip 2136 { frame 1 { var VALUE; var MAST; } } movieClip 2138 { frame 1 { var VALUE; var MAST; } } movieClip 2140 { frame 1 { var VALUE; var MAST; } } movieClip 2142 { frame 1 { var VALUE; var MAST; } } movieClip 2144 { frame 1 { var VALUE; var MAST; } } movieClip 2146 { frame 1 { var VALUE; var MAST; } } movieClip 2148 { frame 1 { var VALUE; var MAST; } } movieClip 2151 { frame 1 { var VALUE; var MAST; } } movieClip 2154 { frame 1 { var VALUE; var MAST; } } movieClip 2157 { frame 1 { var VALUE; var MAST; } } movieClip 2160 { frame 1 { var VALUE; var MAST; } } movieClip 2163 { frame 1 { var VALUE; var MAST; } } movieClip 2166 { frame 1 { var VALUE; var MAST; } } movieClip 2169 { frame 1 { var VALUE; var MAST; } } movieClip 2172 { frame 1 { var VALUE; var MAST; } } movieClip 2175 { frame 1 { var VALUE; var MAST; } } movieClip 2178 { frame 1 { var VALUE; var MAST; } } movieClip 2182 { frame 1 { var VALUE; var MAST; } } movieClip 2186 { frame 1 { var VALUE; var MAST; } } movieClip 2190 { frame 1 { var VALUE; var MAST; } } movieClip 2192 { frame 1 { var VALUE; var MAST; } } movieClip 2194 { frame 1 { var VALUE; var MAST; } } movieClip 2196 { frame 1 { var VALUE; var MAST; } } movieClip 2198 { frame 1 { var VALUE; var MAST; } } movieClip 2200 { frame 1 { var VALUE; var MAST; } } movieClip 2202 { frame 1 { var VALUE; var MAST; } } movieClip 2204 { frame 1 { var VALUE; var MAST; } } movieClip 2206 { frame 1 { var VALUE; var MAST; } } movieClip 2208 { frame 1 { var VALUE; var MAST; } } movieClip 2210 { frame 1 { var VALUE; var MAST; } } movieClip 2212 { frame 1 { var VALUE; var MAST; } } movieClip 2214 { frame 1 { var VALUE; var MAST; } } movieClip 2216 { frame 1 { var VALUE; var MAST; } } movieClip 2219 { } movieClip 2220 { } movieClip 2223 { } movieClip 2227 { frame 7 { gotoAndStop(1); } } movieClip 2230 { } movieClip 2233 { } movieClip 2235 { } movieClip 2238 { } movieClip 2240 { } movieClip 2242 { } movieClip 2245 { } // unknown tag 88 length 118 movieClip 2257 { } movieClip 2261 { frame 1 { } } movieClip 2265 { frame 1 { function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } if (_root.LampFlag) { if (randRange(1, 99) > 80) { gotoAndPlay('Shine1'); } if (randRange(1, 99) < 30) { gotoAndPlay('Shine2'); } } } frame 2 { gotoAndPlay('Lstart'); } frame 8 { gotoAndPlay('Lstart'); } } movieClip 2270 { } movieClip 2273 { } movieClip 2314 { } movieClip 2322 { } movieClip 2336 { } movieClip 2345 { } // unknown tag 88 length 148 movieClip 2351 { } frame 6 { function initSet() { YouCompBlink = false; YouPlayBan_mc._visible = false; CompPlayBan_mc._visible = false; Next_btn._visible = false; MorePlay_btn._visible = false; help_mc._visible = false; EndBalls = false; BallsInGame = ballQ; WasGoal = false; chkYouComp = 0; highscoreComp_txt.text = highscore1; highscore_txt.text = highscore2; WaitLastBall = false; aim_mc._alpha = 100; YouWin_mc._visible = false; YouWin_mc._xscale = 100; YouWin_mc._yscale = YouWin_mc._xscale; CompWin_mc._visible = false; CompWin_mc._xscale = 100; CompWin_mc._yscale = CompWin_mc._xscale; YouWinGame_mc._visible = false; YouWinGame_mc._xscale = 100; YouWinGame_mc._yscale = YouWinGame_mc._xscale; BillyWinGame_mc.gotoAndStop(1); ballOutCnt = 0; BSQ1 = 0; BSQ2 = 0; time = 0; ++gamecnt; gamecnt_txt.text = gamecnt; goalcnt1 = 0; goalcnt2 = 0; lev1 = 0; lev2 = 0; KiyHitFlag = 0; KiyHitOppFlag = 0; winFlag = false; i = 0; while (i <= ballQ) { BallArr[i]._x = init_x[i]; BallArr[i]._y = init_y[i]; BallArr[i]._visible = true; BallArr[i]._alpha = 100; BallArr[i]._xscale = 100; BallArr[i]._yscale = BallArr[i]._xscale; wtG[i] = 0; ballFlag[i] = true; dirAngle[i] = 0; ++i; } if (WhoWin == 0) { if (PrevWhoWin == 2) { GameStep = 11; } if (PrevWhoWin == 1) { GameStep = 31; } } if (WhoWin == 1) { GameStep = 31; } if (WhoWin == 2) { GameStep = 11; } S20_btn._visible = true; S50_btn._visible = true; S100_btn._visible = true; Deal_btn._visible = true; BetShine_mc._visible = true; Kiy_mc._visible = false; aimFlag = false; MyBet = 0; MyBet_txt.text = MyBet; MyBank_txt.text = MyBank; OppBank_txt.text = OppBank; } function checkBallY(p) { Mflag = 0; var v1 = 0; while (v1 <= ballQ - 1) { if (v1 != p) { if (BallArr[v1].body_mc.hitTest(BallArr[p].body_mc)) { M = v1; ++Mflag; } } ++v1; } if (Mflag > 0) { if (BallArr[p]._x < 600) { BallArr[p]._x = BallArr[M]._x + 50; } else { BallArr[p]._x = BallArr[M]._x - 50; } } } function checkBallX(p) { Mflag = 0; var v1 = 0; while (v1 <= ballQ - 1) { if (v1 != p) { if (BallArr[v1].body_mc.hitTest(BallArr[p].body_mc)) { M = v1; ++Mflag; } } ++v1; } if (Mflag > 0) { if (BallArr[p]._y < 360) { BallArr[p]._y = BallArr[M]._y + 50; } else { BallArr[p]._y = BallArr[M]._y - 50; } } } function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } if (!PoolFlag) { } var Surrend = true; var ChangePlayer = false; var LEVEL = 1; var PrevWhoWin = 2; var GameTime = 5; var time = 0; var limit = GameTime * 60; var sT = 0; var OldDiffer; var secstr; var minstr; var KiyTurn = false; var KiyClock = true; var wtK = 0; var AlRad; var Napr = new Array(); var Nr = 1; var SmallerAngle = 180; var GA = 0; var angPodstav; var NewDirAngle; var YouDirAngle; var CompPlay = false; var Kas = new Array(); var KasY = new Array(); var ChkHol = new Array(); var BallToAim = new Array(); var BallToShoot = new Array(); var Angles = new Array(); var AngHoles = new Array(); var DBF = new Array(); var HoleOK = new Array(); var HoleOK2 = new Array(); var AngHoles2 = new Array(); var BallFree = false; var PlayYou = false; var WasGoal = false; var chkYouComp = 0; var ballQ = 7; var freeOK = false; var STx = new Array(); var STy = new Array(); var StDx = 50; var StDy = 50; var LS = new Array(0, 0, 0, 0, 0, 0, 0); var u; var v; var k; var kM; var DB = 35; var cc = 0; var Seconds = 0; var Minutes = 0; var Timelim = 360; var winFlag = false; var IncrInit = 16; var incr_x = new Array(0, 0, 0, 0, 0, 0, 0); var incr_y = new Array(0, 0, 0, 0, 0, 0, 0); var lev1 = 0; var lev2 = 0; var Incr = new Array(0, 0, 0, 0, 0, 0); var DrebBord = new Array(0, 0, 0, 0, 0, 0); var DrebCnt = new Array(0, 0, 0, 0, 0, 0); var ballFlag = new Array(true, true, true, true, true, true, true); var BallArr = new Array(); var HoleArr = new Array(); var dirAngle = new Array(0, 0, 0, 0, 0, 0, 0); var goalBall = new Array(false, false, false, false, false, false, false); var init_x = new Array(8); var init_y = new Array(8); var K = new Array(0, 0, 0, 0, 0, 0, 0); var alfarad = 0; var alfa = 0; var Beta = 0; var Gamma; var OldDir = 0; var Omega = 0; var koef1 = 0.985; var koef2 = 0.975; var MouseX; var MouseY; var wtTc = new Array(0, 0, 0, 0, 0, 0, 0); var wt = 0; var wtG = new Array(8); var i; var j; var q; var p; var Ho = new Array(0, 0, 0, 0, 0, 0, 0); var H = 0; var B = 0; var M; var Mflag; var aimFlag = false; var Touch = false; var StartX = new Array(); var StartY = new Array(); StartX[1] = StartPlace1_mc._x; StartY[1] = StartPlace1_mc._y - 30; StartX[2] = StartPlace_mc._x; StartY[2] = StartPlace_mc._y - 30; var inFlag = new Array(false, false, false, false, false, false, false); var goalflag = 0; var goalcnt1 = 0; var goalcnt2 = 0; var ballOut = false; var ballOutCnt = 0; var goalPlace_X = new Array(); var goalPlace_Y = new Array(); goalPlace_X[1] = holeOut1_mc._x; goalPlace_Y[1] = holeOut1_mc._y; goalPlace_X[2] = holeOut_mc._x; goalPlace_Y[2] = holeOut_mc._y; var PL = 1; var SfX = new Array(0, 6, -6); var Sf = new Array(0, 1, -1); var DX; var DY; var iX = new Array(8, 8, 8, 8, 8, 8, 8); var iY = new Array(8, 8, 8, 8, 8, 8, 8); var IncrMx = new Array(0, 0, 0, 0, 0, 0, 0); var IncrMy = new Array(0, 0, 0, 0, 0, 0, 0); var LuzSndFlag = true; var girlChangeFlag = false; var CCos; var SSin; var IncrW; var IncrW2; var Xm = new Array(); var Ym = new Array(); var touch = new Array(false, false, false, false, false, false, false); var razbros; var ShePlayFirst = false; var YouCompBlink = false; var ballRoll = false; var KiyHitFlag = 0; var KiyHitOppFlag = 0; BallArr[0] = BallWhite_mc; BallArr[1] = BallRed1_mc; BallArr[2] = BallRed2_mc; BallArr[3] = BallRed3_mc; BallArr[4] = BallRed4_mc; BallArr[5] = BallRed5_mc; BallArr[6] = BallRed6_mc; HoleArr[1] = hole1_mc; HoleArr[2] = hole2_mc; HoleArr[3] = hole3_mc; HoleArr[4] = hole4_mc; HoleArr[5] = hole5_mc; HoleArr[6] = hole6_mc; i = 0; while (i <= ballQ) { init_x[i] = BallArr[i]._x; init_y[i] = BallArr[i]._y; wtG[i] = 0; ++i; } var girlQnt = 8; var chngFlag = false; var gNMem = 1; var wch = 0; var NextOff = false; var EroFlag = false; var erotime = 0; levelUp2_mc.setMask(levMask2_mc); levelUp1_mc.setMask(levMask1_mc); levelUp3_mc.setMask(levMask3_mc); Next_btn._visible = false; MorePlay_btn._visible = false; help_mc._visible = false; if (SoundMind) { SoundOn_btn._visible = false; } if (CardHidePlace == 2) { CCard_mc._visible = true; } else { CCard_mc._visible = false; } duplicateMovieClip(Kiy01_mc, 'Kiy_mc', 201); duplicateMovieClip(Kiy02_mc, 'Kiy2_mc', 202); Kiy01_mc._visible = false; Kiy02_mc._visible = false; Kiy2_mc._visible = false; WhoWin = 2; GameStep = 1; LuzaSound_mc.gotoAndStop('lusastop'); BallSound_mc.gotoAndStop('stopSound'); YouPlayBan_mc._visible = false; CompPlayBan_mc._visible = false; highscoreComp_txt.text = highscore1; highscore_txt.text = highscore2; gamecnt_txt.text = gamecnt; FuckedTotal_txt.text = FuckedTotal; TotalGirls_txt.text = GilsDone + '/' + GirlsQ; cardOnPanel_mc._visible = false; if (CardTakeFlag == 3) { cardOnPanel_mc._visible = true; } var OldIncr = new Array(); var BallScrd1 = new Array(15); var BallScrd2 = new Array(15); var BallsInGame = ballQ; var EndBalls = false; var WaitLastBall = false; var WBQnt = 0; var WBarr = new Array(15); var wtDL = new Array(8); var BSQ1 = 0; var BSQ2 = 0; var SurD = 1; var SurDY = 0; var StartGame = true; var OppBankInit = 250; var OppBank = OppBankInit; var MyBet = 0; initSet(); stop(); BallsLogic_mc.onEnterFrame = function () { function aftertouch(u, v) { var v5; var v7; var v8; var v6; var v4; var v3; if (BallArr[v].hitTest(BallArr[u]._x, BallArr[u]._y, true)) { AlfaCalc(v, u); v7 = Math.abs(BallArr[u]._x - BallArr[v]._x); v8 = Math.abs(BallArr[u]._y - BallArr[v]._y); v6 = Math.sqrt(v7 * v7 + v8 * v8); v5 = DB - v6; if (v6 < DB) { v5 = DB - v6; v4 = v5 * Math.cos(alfa / 57.32); v3 = v5 * Math.sin(alfa / 57.32); v4 = Math.abs(v4) / 2; v3 = Math.abs(v3) / 2; if (BallArr[u]._x < BallArr[v]._x) { BallArr[u]._x -= v4; BallArr[v]._x += v4; } else { BallArr[u]._x += v4; BallArr[v]._x -= v4; } if (BallArr[u]._y < BallArr[v]._y) { BallArr[u]._y -= v3; BallArr[v]._y += v3; } else { BallArr[u]._y += v3; BallArr[v]._y -= v3; } } } } function detouch(w, ww) { touch[w] = false; touch_mc._x = Xm[w]; touch_mc._y = Ym[w]; k = 0; while (k <= Incr[w] * 2) { if (!touch[w]) { if (BallArr[ww].hitTest(touch_mc._x, touch_mc._y, true)) { touch[w] = true; BallArr[w]._x = touch_mc._x; BallArr[w]._y = touch_mc._y; kM = k; } touch_mc._x += Math.cos(dirAngle[w] / 57.32); touch_mc._y += Math.sin(dirAngle[w] / 57.32); } ++k; } } function AlfaCalc(n1, n2) { if (BallArr[n1]._x < BallArr[n2]._x) { alfarad = Math.atan((BallArr[n2]._y - BallArr[n1]._y) / (BallArr[n2]._x - BallArr[n1]._x)); } else { alfarad = Math.atan((BallArr[n2]._y - BallArr[n1]._y) / (BallArr[n2]._x - BallArr[n1]._x)) - Math.PI; } alfa = alfarad * 90 / 1.57; alfa = AngleTo360(alfa); } function AngleTo360(ang) { dirAn_mc._rotation = ang; ang = dirAn_mc._rotation; return ang; } function BB(n1, n2) { var v4; var v3; var v6; var v5; if (Incr[n1] > 0 || Incr[n2] > 0) { BallSound_mc.gotoAndPlay(2); } if (BallArr[n1]._x < BallArr[n2]._x) { alfarad = Math.atan((BallArr[n2]._y - BallArr[n1]._y) / (BallArr[n2]._x - BallArr[n1]._x)); } else { alfarad = Math.atan((BallArr[n2]._y - BallArr[n1]._y) / (BallArr[n2]._x - BallArr[n1]._x)) - Math.PI; } alfa = alfarad * 90 / 1.57; Gamma = alfa - dirAngle[n1]; if (Gamma > 360) { Gamma -= 360; } if (Gamma < -360) { Gamma += 360; } if (Gamma > 180 && Gamma < 360) { Gamma = -(360 - Gamma); } if (Gamma < -180) { Gamma += 360; } Beta = alfa + 180 + Gamma; OldDir = dirAngle[n1]; Omega = Beta - dirAngle[n1]; dirAngle[n1] = Beta; dirAngle[n1] = AngleTo360(dirAngle[n1]); IncrW = Incr[n1]; IncrW2 = Incr[n2]; CCos = Math.cos(Omega / 2 / 57.32); SSin = Math.sin(Omega / 2 / 57.32); if (Math.abs(CCos) < 0.14) { Incr[n1] = IncrW * 0.2; } else { Incr[n1] = IncrW * CCos; } if (Math.abs(SSin) < 0.14) { Incr[n2] = IncrW * 0.2; } else { Incr[n2] = IncrW * SSin; } Incr[n1] = Math.abs(Incr[n1]); Incr[n2] = Math.abs(Incr[n2]); dirAngle[n2] = OldDir + Gamma; dirAngle[n2] = AngleTo360(dirAngle[n2]); incr_x[n1] = Math.cos(dirAngle[n1] / 57.32) * Incr[n1]; incr_y[n1] = Math.sin(dirAngle[n1] / 57.32) * Incr[n1]; incr_x[n2] = Math.cos(dirAngle[n2] / 57.32) * Incr[n2]; incr_y[n2] = Math.sin(dirAngle[n2] / 57.32) * Incr[n2]; MacMac_mc._x = BallArr[n1]._x + Math.cos(dirAngle[n1] / 57.32) * 34; MacMac_mc._y = BallArr[n1]._y + Math.sin(dirAngle[n1] / 57.32) * 34; if (MacMac_mc.hitTest(BallArr[n2].body_mc)) { } MacMac_mc._x = BallArr[n2]._x + Math.cos(dirAngle[n2] / 57.32) * 34; MacMac_mc._y = BallArr[n2]._y + Math.sin(dirAngle[n2] / 57.32) * 34; if (MacMac_mc.hitTest(BallArr[n1].body_mc)) { dirAngle[n2] = AngleTo360(dirAngle[n2] + 180); } } function BBborder(n) { if (n == 1) { dirAngle[i] = 360 - dirAngle[i]; } if (n == 2) { dirAngle[i] = 180 - dirAngle[i]; } if (n == 3) { dirAngle[i] = 360 - dirAngle[i]; } if (n == 4) { dirAngle[i] = 180 - dirAngle[i]; } if (dirAngle[i] > 360) { dirAngle[i] -= 360; } if (dirAngle[i] < 0) { dirAngle[i] += 360; } incr_x[i] = Math.cos(dirAngle[i] / 57.32) * Incr[i]; incr_y[i] = Math.sin(dirAngle[i] / 57.32) * Incr[i]; BallArr[i]._x += incr_x[i] * 2; BallArr[i]._y += incr_y[i] * 2; } var i; var v16; var v1; i = 0; while (i <= ballQ - 1) { if (ballFlag[i]) { Xm[i] = BallArr[i]._x; Ym[i] = BallArr[i]._y; OldIncr[i] = Incr[i]; BallArr[i]._x += incr_x[i]; BallArr[i]._y += incr_y[i]; v1 = 1; while (v1 <= 6) { if (BallArr[i].body_mc.hitTest(HoleArr[v1].holeaim_mc)) { goalflag = v1; ++ballOutCnt; StartGame = false; ballOut = true; goalBall[i] = true; ballFlag[i] = false; inFlag[i] = true; if (GameStep == 2) { PL = 2; } else { PL = 1; } WasGoal = false; if (Touch) { WasGoal = true; if (GameStep == 2) { if (i != 0) { ++goalcnt2; } } else { if (i != 0) { ++goalcnt1; } } if (i != 0) { --BallsInGame; if (BallsInGame <= 1) { EndBalls = true; } } } incr_x[i] = 0; incr_y[i] = 0; Incr[i] = 0; H = v1; Ho[i] = v1; B = i; K[B] = 0; ++wt; } ++v1; } } if (ballFlag[i]) { if (BallArr[i].body_mc.hitTest(borderUp_mc)) { ++DrebBord[1]; if (DrebBord[1] <= 1) { BBborder(1); } } else { DrebBord[1] = 0; } if (BallArr[i].body_mc.hitTest(borderRt_mc)) { ++DrebBord[2]; if (DrebBord[2] <= 1) { BBborder(2); } } else { DrebBord[2] = 0; } if (BallArr[i].body_mc.hitTest(borderDw_mc)) { ++DrebBord[3]; if (DrebBord[3] <= 1) { BBborder(3); } } else { DrebBord[3] = 0; } if (BallArr[i].body_mc.hitTest(borderLf_mc)) { ++DrebBord[4]; if (DrebBord[4] <= 1) { BBborder(4); } } else { DrebBord[4] = 0; } } ++i; } u = 0; while (u <= ballQ - 1) { if (ballFlag[u]) { v = 0; while (v <= ballQ - 1) { if (u != v) { if (OldIncr[u] > 0) { if (OldIncr[u] > OldIncr[v]) { if (BallArr[v].hitTest(BallArr[u]._x, BallArr[u]._y, true)) { detouch(u, v); if (kM != 0) { BB(u, v); BallArr[u]._x += incr_x[u]; BallArr[u]._y += incr_y[u]; } else { BallArr[u]._x += incr_x[u]; BallArr[u]._y += incr_y[u]; } aftertouch(u, v); Touch = true; } } } } ++v; } } ++u; } q = 0; while (q <= ballQ - 1) { if (ballFlag[q]) { p = 0; while (p <= ballQ - 1) { if (q != p) { if (BallArr[p].hitTest(BallArr[q]._x, BallArr[q]._y, true)) { aftertouch(q, p); } } ++p; } } ++q; } i = 0; while (i <= ballQ - 1) { if (ballFlag[i]) { if (BallArr[i]._y < borderUp_mc._y) { BallArr[i]._y = borderUp_mc._y + 26; checkBallY(i); if (incr_y[i] < 0) { incr_y[i] = -incr_y[i]; } } if (BallArr[i]._y > borderDw_mc._y) { BallArr[i]._y = borderDw_mc._y - 26; checkBallY(i); if (incr_y[i] > 0) { incr_y[i] = -incr_y[i]; } } if (BallArr[i]._x > borderRt_mc._x) { BallArr[i]._x = borderRt_mc._x - 26; checkBallX(i); if (incr_x[i] > 0) { incr_x[i] = -incr_x[i]; } } if (BallArr[i]._x < borderLf_mc._x) { BallArr[i]._x = borderLf_mc._x + 26; checkBallX(i); if (incr_x[i] < 0) { incr_x[i] = -incr_x[i]; } } if (BallArr[i]._y < borderUpC_mc) { BallArr[i]._y = borderUp_mc._y + 26; checkBallY(i); } if (BallArr[i]._y > borderDownC_mc._y) { BallArr[i]._y = borderDw_mc._y - 26; checkBallY(i); } if (BallArr[i]._x > borderRighC_mc._x) { BallArr[i]._x = borderRt_mc._x - 26; checkBallX(i); } if (BallArr[i]._x < borderLeftC_mc._x) { BallArr[i]._x = borderLf_mc._x + 26; checkBallX(i); } } i = 0; while (i <= ballQ - 1) { IncrMx[i] = incr_x[i]; IncrMy[i] = incr_y[i]; if (Incr[i] > 3) { Incr[i] *= koef1; incr_x[i] *= koef1; incr_y[i] *= koef1; } else { Incr[i] *= koef2; incr_x[i] *= koef2; incr_y[i] *= koef2; } if (Incr[i] <= 2) { Incr[i] = 0; incr_x[i] = 0; incr_y[i] = 0; } ++i; } ++i; } }; goalproc_mc.onEnterFrame = function () { function goalprocedure(B) { if (K[B] == 0) { if (inFlag[B]) { DX = HoleArr[Ho[B]]._x - BallArr[B]._x; DY = HoleArr[Ho[B]]._y - BallArr[B]._y; iX[B] = DX / 5; iY[B] = DY / 5; inFlag[B] = false; } if (BallArr[B].body_mc.hitTest(HoleArr[Ho[B]]._x, HoleArr[Ho[B]]._y, true)) { BallArr[B]._x = HoleArr[Ho[B]]._x; BallArr[B]._y = HoleArr[Ho[B]]._y; K[B] = 1; } else { BallArr[B]._x += iX[B]; BallArr[B]._y += iY[B]; } } if (K[B] == 1) { ++LS[B]; BallArr[B]._xscale -= 0.75; BallArr[B]._yscale = BallArr[B]._xscale; BallArr[B]._alpha -= 1; if (LS[B] == 10) { if (Touch) { if (B != 0) { LuzaSound_mc.gotoAndPlay(2); } } } if (BallArr[B]._xscale < 75) { BallArr[B]._visible = false; FaceClip._visible = flase; BallArr[B]._x = goalPlace_X[PL]; BallArr[B]._y = goalPlace_Y[PL]; wtG[B] = 0; wtDL[B] = 40; i = 0; while (i <= ballQ - 1) { if (wtG[i] > 0) { wtDL[B] += 40; } ++i; } ++wtG[B]; K[B] = 2; LS[B] = 0; freePlace = false; StartPlace_mc._x = StartX[PL]; StartPlace_mc._y = StartY[PL]; } } if (K[B] == 2) { ++wtG[B]; if (wtG[B] >= wtDL[B]) { K[B] = 3; } } if (K[B] == 3) { BallArr[B]._visible = true; K[B] = 4; } if (K[B] == 4) { BallArr[B]._xscale += 0.75; BallArr[B]._yscale = BallArr[B]._xscale; BallArr[B]._alpha += 1; if (BallArr[B]._xscale >= 100) { BallArr[B]._xscale = 100; BallArr[B]._yscale = 100; BallArr[B]._alpha = 100; K[B] = 5; } } if (K[B] == 5) { if (BallArr[B]._y < StartY[PL]) { BallArr[B]._y += 4; } else { BallArr[B]._y = StartY[PL]; if (PL == 1) { ++BSQ1; BallScrd1[BSQ1] = BallArr[B]; } else { ++BSQ2; BallScrd2[BSQ2] = BallArr[B]; } K[B] = 6; freePlace = false; } } if (K[B] == 6) { if (PL == 1) { i = 1; while (i <= BSQ1) { if (BallScrd1[BSQ1]._y < StartY[1] + 34) { BallScrd1[i]._y += 4; } else { K[B] = 7; } ++i; } } else { i = 1; while (i <= BSQ2) { if (BallScrd2[BSQ2]._y < StartY[1] + 34) { BallScrd2[i]._y += 4; } else { K[B] = 7; } ++i; } } } if (K[B] == 7) { if (B == 0) { ballFlag[B] = true; ++WBQnt; StartPlace_mc._y = BallArr[B]._y; StartPlace_mc._x = BallArr[B]._x + 100 * Sf[PL]; if (PL == 1) { --BSQ1; } else { --BSQ2; } K[B] = 8; } else { K[B] = 9; } } if (K[B] == 8) { BallArr[B]._x += SfX[PL]; if (PL == 1) { if (BallArr[B]._x > StartPlace_mc._x) { BallArr[B]._x = StartPlace_mc._x; ChangePlayer = true; K[B] = 9; } } else { if (BallArr[B]._x < StartPlace_mc._x) { BallArr[B]._x = StartPlace_mc._x; ChangePlayer = true; K[B] = 9; } } } if (K[B] == 9) { wtG[B] = 0; goalBall[B] = false; --ballOutCnt; if (ballOutCnt == 0) { if (Touch) { if (!ChangePlayer) { if (GameStep == 2) { GameStep = 1; } if (GameStep == 4) { GameStep = 3; } } else { ChangePlayer = false; if (GameStep == 2) { GameStep = 3; } if (GameStep == 4) { GameStep = 1; } } } ChangePlayer = false; } i = 0; while (i <= ballQ - 1) { if (i != B) { if (ballFlag[i]) { aftertouch(B, i); } } ++i; } K[B] = 0; } } var v1 = 0; while (v1 <= ballQ - 1) { if (goalBall[v1]) { goalprocedure(v1); } ++v1; } }; timer_mc.onEnterFrame = function () { var v1; if (wt > 0) { ++wt; if (wt > 40) { wt = 0; if (GameStep >= 1 && GameStep <= 2) { lev2 = goalcnt2; } else { lev1 = goalcnt1; } if (EndBalls) { WaitLastBall = true; alarm_mc.play(); } } } if (WaitLastBall) { if (Incr[0] > 0) { } else { if (!goalBall[0]) { GameStep = 0; WaitLastBall = false; winFlag = true; aim_mc._alpha = 100; Next_btn._visible = true; YouPlayBan_mc._visible = false; CompPlayBan_mc._visible = false; NewDiffer = goalcnt2 - goalcnt1; OldDiffer = Differscr; if (NewDiffer > Differscr) { Differscr = NewDiffer; highscore1 = goalcnt1; highscore2 = goalcnt2; } highscoreComp_txt.text = highscore1; highscore_txt.text = highscore2; if (goalcnt1 == goalcnt2) { WhoWin = 0; MyBank += MyBet; MyBank_txt.text = MyBank; OppBank = OppBank; OppBank_txt.text = OppBank; MyBet = 0; MyBet_txt.text = MyBet; } else { gNMem = LEVEL; if (goalcnt1 > goalcnt2) { WhoWin = 1; PrevWhoWin = 1; if (LEVEL > 1) { --LEVEL; if (LEVEL < 3) { Surrend = true; } } CompWin_mc._visible = true; MyBank = MyBank; MyBank_txt.text = MyBank; OppBank += MyBet; OppBank_txt.text = OppBank; MyBet = 0; MyBet_txt.text = MyBet; OopsSnd2_mc.play(); } else { WhoWin = 2; PrevWhoWin = 2; MyBank += MyBet * 2; OppBank -= MyBet; MyBank_txt.text = MyBank; OppBank_txt.text = OppBank; MyBet = 0; MyBet_txt.text = MyBet; coinsSound_mc.play(); Next_btn._visible = true; if (LEVEL < 8) { ++LEVEL; if (LEVEL >= 3) { Surrend = false; } } if (OppBank <= 0) { YouWinGame_mc._visible = true; Next_btn._visible = false; } else { YouWin_mc._visible = true; Next_btn._visible = true; } } } } } } }; field_mc.onRelease = function () { if (!winFlag) { if (GameStep == 1) { if (aimFlag) { KiyHitFlag = 1; MouseX = _root._xmouse; MouseY = _root._ymouse; if (MouseX > BallWhite_mc._x) { AlRad = Math.atan((MouseY - BallWhite_mc._y) / (MouseX - BallWhite_mc._x)); } else { AlRad = Math.atan((MouseY - BallWhite_mc._y) / (MouseX - BallWhite_mc._x)) - Math.PI; } YouDirAngle = AlRad * 90 / 1.57; dirAngle[0] = YouDirAngle; GameStep = 2; } } } }; field_mc.onEnterFrame = function () { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { aim_mc._visible = true; Mouse.hide(); } else { aim_mc._visible = false; Mouse.show(); } }; var nk = 0; Kiy_mc.onEnterFrame = function () { var v3; if (GameStep == 1) { if (aimFlag) { if (!winFlag) { this._visible = true; } this._x = BallWhite_mc._x; this._y = BallWhite_mc._y; MouseX = _root._xmouse; MouseY = _root._ymouse; if (MouseX > BallWhite_mc._x) { AlRad = Math.atan((MouseY - BallWhite_mc._y) / (MouseX - BallWhite_mc._x)); } else { AlRad = Math.atan((MouseY - BallWhite_mc._y) / (MouseX - BallWhite_mc._x)) - Math.PI; } v3 = AlRad * 90 / 1.57; if (MouseX == BallWhite_mc._x) { if (MouseY > BallWhite_mc._y) { v3 = 90; } else { v3 = -90; } } this._rotation = v3; } } if (KiyHitFlag == 1) { this.KiyMove_mc._x -= 9; if (this.KiyMove_mc._x <= -65) { this.KiyMove_mc._x = -65; nk = 0; KiyHitFlag = 2; } } if (KiyHitFlag == 2) { this.KiyMove_mc._x += 13; ++nk; if (this.KiyMove_mc._x >= -26 && this.KiyMove_mc._x <= -26) { CueSound_mc.gotoAndPlay(2); } if (this.KiyMove_mc._x >= -13) { this.KiyMove_mc._x = -13; KiyHitFlag = 3; Incr[0] = IncrInit; ballRoll = true; StartGame = false; incr_x[0] = Math.cos(dirAngle[0] / 57.32) * Incr[0]; incr_y[0] = Math.sin(dirAngle[0] / 57.32) * Incr[0]; aimFlag = false; Touch = false; WasGoal = false; chkYouComp = 0; } } if (KiyHitFlag == 3) { this.KiyMove_mc._x = -29; KiyHitFlag = 0; this._visible = false; } }; Kiy2_mc.onEnterFrame = function () { if (!winFlag) { if (GameStep == 5) { if (KiyTurn) { if (KiyClock) { if (Kiy2_mc._rotation < NewDirAngle) { Kiy2_mc._rotation += 4; } } else { if (Kiy2_mc._rotation > NewDirAngle) { Kiy2_mc._rotation -= 4; if (Kiy2_mc._rotation < 0) { Kiy2_mc._rotation += 360; } } } if (Math.abs(NewDirAngle - Kiy2_mc._rotation) < 6) { Kiy2_mc._rotation = NewDirAngle; KiyTurn = false; ++wtK; } } if (wtK > 0) { ++wtK; if (wtK >= 25) { wtK = 0; KiyHitOppFlag = 1; CompPlay = false; StartGame = false; } } } if (KiyHitOppFlag == 1) { this.KiyMove_mc._x -= 9; if (this.KiyMove_mc._x <= -65) { this.KiyMove_mc._x = -65; nk = 0; KiyHitOppFlag = 2; } } if (KiyHitOppFlag == 2) { this.KiyMove_mc._x += 13; ++nk; if (this.KiyMove_mc._x >= -26 && this.KiyMove_mc._x <= -26) { CueSound_mc.gotoAndPlay(2); } if (this.KiyMove_mc._x >= -13) { this.KiyMove_mc._x = -13; KiyHitOppFlag = 3; Incr[0] = 16; dirAngle[0] = NewDirAngle; incr_x[0] = Math.cos(dirAngle[0] / 57.32) * Incr[0]; incr_y[0] = Math.sin(dirAngle[0] / 57.32) * Incr[0]; aimFlag = false; Touch = false; WasGoal = false; chkYouComp = 0; GameStep = 4; } if (KiyHitOppFlag == 3) { this.KiyMove_mc._x = -29; KiyHitOppFlag = 0; this._visible = false; } } } }; PlaySeqnc_mc.onEnterFrame = function () { var v1; var v3; var v2; var v4; var v10; var v11; var v7; var v5; var v14; var v15; var v12; var v8; var v6; var v9; var v13; if (!StartGame) { if (ballOutCnt == 0) { ballRoll = false; v1 = 0; while (v1 <= ballQ - 1) { if (Incr[v1] > 0) { ballRoll = true; } ++v1; } if (!ballRoll) { if (chkYouComp == 0) { YouCompBlink = true; chkYouComp = 1; } } } if (chkYouComp == 1) { if (!Touch) { chkYouComp = 2; if (GameStep == 2) { GameStep = 3; } if (GameStep == 4) { GameStep = 1; } } if (!WasGoal) { chkYouComp = 2; if (GameStep == 2) { GameStep = 3; } if (GameStep == 4) { GameStep = 1; } } if (GameStep == 1) { aimFlag = true; } } } if (GameStep == 1) { aim_mc._alpha = 100; if (!winFlag) { YouPlayBan_mc._visible = true; } if (YouCompBlink) { YouPlayBan_mc.play(); YouCompBlink = false; } CompPlayBan_mc._visible = false; } if (GameStep == 3) { YouPlayBan_mc._visible = false; if (!winFlag) { CompPlayBan_mc._visible = true; aim_mc._alpha = 20; } if (YouCompBlink) { CompPlayBan_mc.play(); YouCompBlink = false; } } if (GameStep == 3) { CheckDir1_mc._x = BallWhite_mc._x; CheckDir1_mc._y = BallWhite_mc._y; v1 = 1; while (v1 <= ballQ - 1) { BallToAim[v1] = true; BallToShoot[v1] = false; HoleOK[v1] = 0; v10 = Math.abs(BallWhite_mc._x - BallArr[v1]._x); v11 = Math.abs(BallWhite_mc._y - BallArr[v1]._y); DBF[v1] = Math.sqrt(v10 * v10 + v11 * v11); ++v1; } v1 = 1; while (v1 <= ballQ - 1) { if (BallArr[v1]._x < BallWhite_mc._x) { v7 = Math.atan((BallArr[v1]._y - BallArr[0]._y) / (BallArr[v1]._x - BallArr[0]._x)); } else { v7 = Math.atan((BallArr[v1]._y - BallArr[0]._y) / (BallArr[v1]._x - BallArr[0]._x)) - Math.PI; } v5 = v7 * 90 / 1.57 + 180; CheckDir1_mc._rotation = v5; Angles[v1] = v5; Napr[v1] = CheckDir1_mc.duplicateMovieClip('Nap' + v1, 800 + v1); v3 = 1; while (v3 <= ballQ - 1) { if (v3 != v1) { bemp2_mc._x = BallArr[v3]._x; bemp2_mc._y = BallArr[v3]._y; if (Napr[v1].hitTest(bemp2_mc._x, bemp2_mc._y, true)) { if (DBF[v1] > DBF[v3]) { BallToAim[v1] = false; } } } ++v3; } ++v1; } v13 = 0; v3 = 1; while (v3 <= ballQ - 1) { if (BallToAim[v3]) { ++v13; } Napr[v3].removeMovieClip(); ++v3; } v12 = 0; if (v13 > 0) { v1 = 1; while (v1 <= ballQ - 1) { if (BallToAim[v1]) { Sector_mc._x = BallArr[v1]._x; Sector_mc._y = BallArr[v1]._y; Sector_mc._rotation = Angles[v1]; Napr[v1] = Sector_mc.duplicateMovieClip('Nap' + v1, 800 + v1); v2 = 1; while (v2 <= 6) { if (Napr[v1].hitTest(HoleArr[v2]._x, HoleArr[v2]._y, true)) { if (HoleArr[v2]._x < BallArr[v1]._x) { v7 = Math.atan((HoleArr[v2]._y - BallArr[v1]._y) / (HoleArr[v2]._x - BallArr[v1]._x)); } else { v7 = Math.atan((HoleArr[v2]._y - BallArr[v1]._y) / (HoleArr[v2]._x - BallArr[v1]._x)) - Math.PI; } v5 = v7 * 90 / 1.57 + 180; v8 = false; v4 = 1; while (v4 <= ballQ - 1) { if (v4 != v1) { CheckDir2_mc._x = BallArr[v1]._x; CheckDir2_mc._y = BallArr[v1]._y; CheckDir2_mc._rotation = v5; ChkHol[v1] = CheckDir2_mc.duplicateMovieClip('Ch' + v1, 820 + v1); if (ChkHol[v1].hitTest(BallArr[v4]._x, BallArr[v4]._y, true)) { v8 = true; } } ++v4; } if (!v8) { if (!BallToShoot[v1]) { HoleOK[v1] = v2; AngHoles[v1] = v5; BallToShoot[v1] = true; ++v12; } else { v6 = Math.abs(Angles[v1] - AngHoles[v1]); v9 = Math.abs(Angles[v1] - v5); if (v6 > v9) { HoleOK[v1] = v2; AngHoles[v1] = v5; } } } } ++v2; } } ++v1; } } v3 = 1; while (v3 <= ballQ - 1) { if (BallToAim[v3]) { Napr[v3].removeMovieClip(); } ++v3; } SmallerAngle = 180; if (v12 > 0) { v1 = 1; while (v1 <= ballQ - 1) { if (BallToShoot[v1]) { if (Angles[v1] < 0) { Angles[v1] += 360; } if (AngHoles[v1] < 0) { AngHoles[v1] += 360; } v6 = Math.abs(Angles[v1] - AngHoles[v1]); if (v6 > 360) { v6 -= 360; } if (v6 < SmallerAngle) { GA = v1; SmallerAngle = v6; } } ++v1; } } else { GA = 0; v1 = 1; while (v1 <= ballQ - 1) { if (ballFlag[v1]) { if (BallToShoot[v1]) { GA = v1; } } ++v1; } if (GA == 0) { v1 = 1; while (v1 <= ballQ - 1) { if (ballFlag[v1]) { GA = v1; } ++v1; } } } if (GA == 0) { v1 = 1; while (v1 <= ballQ - 1) { if (ballFlag[v1]) { GA = v1; } ++v1; } } angPodstav = AngHoles[GA] + 180; if (angPodstav > 360) { angPodstav -= 360; } bemp2_mc._x = BallArr[GA]._x + DB * Math.cos(angPodstav / 57.32); bemp2_mc._y = BallArr[GA]._y + DB * Math.sin(angPodstav / 57.32); if (bemp2_mc._x > BallArr[0]._x) { v7 = Math.atan((bemp2_mc._y - BallArr[0]._y) / (bemp2_mc._x - BallArr[0]._x)); } else { v7 = Math.atan((bemp2_mc._y - BallArr[0]._y) / (bemp2_mc._x - BallArr[0]._x)) - Math.PI; } v5 = v7 * 90 / 1.57; Kiy2_mc._x = BallWhite_mc._x; Kiy2_mc._y = BallWhite_mc._y; if (!winFlag) { Kiy2_mc._visible = true; } NewDirAngle = v5; aimFlag = false; CompPlay = true; KiyTurn = true; if (LEVEL >= 6) { if (ShePlayFirst) { NewDirAngle += 0.8; } } if (Surrend) { SurDY = Math.abs(HoleArr[HoleOK[GA]]._y - BallArr[GA]._y); SurD = Math.abs(SurDY / Math.sin(AngHoles[GA] / 57.32)); if (SurD > 250) { razbros = randRange(2, 5) / 10; } else { razbros = randRange(3, 7) / 10; } if (!ShePlayFirst) { NewDirAngle += razbros; } } ShePlayFirst = false; if (NewDirAngle < -180) { NewDirAngle += 360; } if (NewDirAngle > 180) { NewDirAngle -= 360; } if (Kiy2_mc._rotation < 0) { Kiy2_mc._rotation += 360; } if (Kiy2_mc._rotation < NewDirAngle) { KiyClock = true; } else { KiyClock = false; } GameStep = 5; } }; End_btn.onRelease = function () { i = 1; while (i <= WBQnt) { WBarr[i].removeMovieClip(); ++i; } Kiy_mc.removeMovieClip(); Kiy2_mc.removeMovieClip(); if (LEVEL >= 8) { LEVEL = 1; } Mouse.show(); gotoAndPlay('introPlay'); }; Help_btn.onRelease = function () { if (!help_mc._visible) { help_mc._visible = true; } else { help_mc._visible = false; } }; help_mc.onRelease = function () { this._visible = false; }; Next_btn.onRelease = function () { if (WhoWin == 1) { GameStep = 3; } if (WhoWin == 2) { GameStep = 1; } i = 1; while (i <= WBQnt) { WBarr[i].removeMovieClip(); ++i; } i = 1; while (i <= ballQ - 1) { goalBall[i] = false; ++i; } this._visible = false; initSet(); }; MorePlay_btn.onRelease = function () { i = 1; while (i <= WBQnt) { WBarr[i].removeMovieClip(); ++i; } WhoWin = 0; Kiy_mc.removeMovieClip(); Kiy2_mc.removeMovieClip(); introflag = true; LEVEL = 1; FirstLaunch = true; initSet(); }; YouWin_mc.onEnterFrame = function () { if (this._visible) { if (this._xscale < 200) { this._xscale += 2; this._yscale = this._xscale; } else { this._xscale = 200; this._yscale = this._xscale; } } }; YouWinGame_mc.onEnterFrame = function () { if (this._visible) { if (this._xscale < 200) { this._xscale += 2; this._yscale = this._xscale; } else { this._xscale = 200; this._yscale = this._xscale; } } }; CompWin_mc.onEnterFrame = function () { if (this._visible) { if (this._xscale < 200) { this._xscale += 2; this._yscale = this._xscale; } else { this._xscale = 200; this._yscale = this._xscale; } } }; var lev1Old = 0; var lev1Cng = false; var mem1Y = levelUp1_mc.level_txt._y; var Licr1 = 2; levelUp1_mc.onEnterFrame = function () { if (lev1Old != lev1) { this.levelN_txt.text = lev1; lev1Cng = true; if (lev1 > lev1Old) { Licr1 = 2; } else { Licr1 = -2; this.levelN_txt._y = this.level_txt._y - 30; } } if (lev1Cng) { this.level_txt._y -= Licr1; this.levelN_txt._y -= Licr1; if (Licr1 > 0) { if (this.levelN_txt._y <= mem1Y) { this.level_txt.text = lev1; this.level_txt._y = mem1Y; this.levelN_txt._y = this.level_txt._y + 30; lev1Cng = false; lev1Old = lev1; } } else { if (this.levelN_txt._y >= mem1Y) { this.level_txt.text = lev1; this.level_txt._y = mem1Y; this.levelN_txt._y = this.level_txt._y + 30; lev1Cng = false; lev1Old = lev2; } } } }; var levOld = 0; var levCng = false; var memY = levelUp2_mc.level_txt._y; var Licr = 2; levelUp2_mc.onEnterFrame = function () { if (levOld != lev2) { this.levelN_txt.text = lev2; levCng = true; if (lev2 > levOld) { Licr = 2; } else { Licr = -2; this.levelN_txt._y = this.level_txt._y - 30; } } if (levCng) { this.level_txt._y -= Licr; this.levelN_txt._y -= Licr; if (Licr > 0) { if (this.levelN_txt._y <= memY) { this.level_txt.text = lev2; this.level_txt._y = memY; this.levelN_txt._y = this.level_txt._y + 30; levCng = false; levOld = lev2; } } else { if (this.levelN_txt._y >= memY) { this.level_txt.text = lev2; this.level_txt._y = memY; this.levelN_txt._y = this.level_txt._y + 30; levCng = false; levOld = lev2; } } } }; var lev3Old = 0; var lev3Cng = false; var mem3Y = levelUp3_mc.level_txt._y; var Licr3 = 2; levelUp3_mc.onEnterFrame = function () { if (lev3Old != LEVEL) { this.levelN_txt.text = LEVEL; lev3Cng = true; if (LEVEL > lev3Old) { Licr3 = 2; } else { Licr3 = -2; this.levelN_txt._y = this.level_txt._y - 30; } } if (lev3Cng) { this.level_txt._y -= Licr3; this.levelN_txt._y -= Licr3; if (Licr3 > 0) { if (this.levelN_txt._y <= mem3Y) { this.level_txt.text = LEVEL; this.level_txt._y = mem3Y; this.levelN_txt._y = this.level_txt._y + 30; lev3Cng = false; lev3Old = LEVEL; } } else { if (this.levelN_txt._y >= mem3Y) { this.level_txt.text = LEVEL; this.level_txt._y = mem3Y; this.levelN_txt._y = this.level_txt._y + 30; lev3Cng = false; lev3Old = LEVEL; } } } }; S20_btn.onRelease = function () { if (this._visible) { MyBet = 10; MyBet_txt.text = MyBet; BetShine_mc._visible = false; info_txt.text = ' '; } }; S50_btn.onRelease = function () { if (this._visible) { MyBet = 20; MyBet_txt.text = MyBet; BetShine_mc._visible = false; info_txt.text = ' '; } }; S100_btn.onRelease = function () { if (this._visible) { MyBet = 50; MyBet_txt.text = MyBet; BetShine_mc._visible = false; info_txt.text = ' '; } }; Deal_btn.onRelease = function () { if (MyBet > 0 && MyBet <= MyBank) { MyBet_txt.text = MyBet; MyBank -= MyBet; MyBank_txt.text = MyBank; OppBank_txt.text = OppBank; this._visible = false; S20_btn._visible = false; S50_btn._visible = false; S100_btn._visible = false; BetShine_mc._visible = false; if (GameStep == 11) { YouPlayBan_mc._visible = true; GameStep = 1; } else { Kiy_mc._visible = false; ShePlayFirst = true; CompPlayBan_mc._visible = true; GameStep = 3; } StartGame = true; aimFlag = true; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } }; SoundOff_btn.onRelease = function () { this._visible = false; SoundMind = false; SoundOn_btn._visible = true; }; SoundOn_btn.onRelease = function () { this._visible = false; SoundMind = true; SoundOff_btn._visible = true; }; Exit_btn.onRelease = function () { i = 1; while (i <= WBQnt) { WBarr[i].removeMovieClip(); ++i; } Kiy_mc.removeMovieClip(); Kiy2_mc.removeMovieClip(); introflag = true; LEVEL = 1; PoolFlag = false; ReturnFlag = true; MyBank_txt.text = MyBank; Mouse.show(); gotoAndPlay('maincyc'); }; MoreGames_btn.onRelease = function () { getURL('http://gamcore.com', '_blank'); }; DarkFon_mc.onEnterFrame = function () { if (this._alpha > 0) { this._alpha -= 4; } else { this._visible = false; this._alpha = 100; } }; CCard_mc.onRelease = function () { if (CardTakeFlag == 0) { LuzaSound_mc.play(); CardTakeFlag = 1; CardHidePlace = 0; } }; var CcrdDx; var CcrdDy; CCard_mc.onEnterFrame = function () { if (CardTakeFlag == 1) { if (this._xscale < 20) { this._y -= 8; this._xscale += 1; this._yscale = this._xscale; } else { this._xscale = 20; this._yscale = this._xscale; CcrdDx = (this._x - cardOnPanel_mc._x) / 25; CcrdDy = (cardOnPanel_mc._y - this._y) / 25; CardTakeFlag = 2; } } if (CardTakeFlag == 2) { if (this._y < 600) { this._y += CcrdDy; if (this._x > cardOnPanel_mc._x) { this._x -= CcrdDx; } if (this._xscale > 10) { this._xscale -= 2; this._yscale = this._xscale; } } else { this._xscale = 10; this._yscale = this._xscale; this._x = cardOnPanel_mc._x; this._y = cardOnPanel_mc._y; this._visible = false; this._xscale = 10; this._yscale = this._xscale; cardOnPanel_mc._visible = true; CardTakeFlag = 3; } } }; } movieClip 2354 { } movieClip 2356 { } movieClip 2358 { } movieClip 2360 { } movieClip 2362 { } movieClip 2364 { } movieClip 2366 { } movieClip 2368 { } movieClip 2370 { } movieClip 2372 { } movieClip 2376 { } movieClip 2377 { } movieClip 2379 { } movieClip 2381 { } movieClip 2383 { } movieClip 2387 { } movieClip 2390 { } movieClip 2396 { frame 1 { stop(); } frame 20 { gotoAndStop(1); } } movieClip 2399 { frame 1 { stop(); } frame 20 { gotoAndStop(1); } } movieClip 2413 { } movieClip 2416 { } movieClip 2417 { } movieClip 2420 { } movieClip 2422 { } movieClip 2426 { frame 1 { stop(); } frame 27 { gotoAndStop(1); } } movieClip 2427 { } movieClip 2429 { } movieClip 2430 { } movieClip 2432 { } movieClip 2433 { } movieClip 2436 { } movieClip 2439 { } movieClip 2442 { frame 1 { stop(); } frame 50 { stop(); } } movieClip 2445 { } movieClip 2450 { } movieClip 2452 { } instance aim_mc of movieClip 2452 { onClipEvent (load) { Mouse.hide(); startDrag(this, true); } } movieClip 2454 { frame 1 { } frame 1 { } frame 8 { stop(); } } movieClip 2456 { frame 1 { stop(); } frame 8 { gotoAndStop(1); } } frame 7 { function initset() { N = 1; FHcnt = 0; pot = 0; Pot_txt.text = pot; MyBank_txt.text = MyBank; randomarray(); i = 1; while (i <= cardquant) { kolodaOst[i] = koloda[RND[i]]; kolodaOst[i].cacheAsBitmap = true; kolodaOst[i]._visible = false; kolodaOst[i]._x = CardPoint3_mc._x - 200; kolodaOst[i]._y = CardPoint3_mc._y + i * 4; cardval = RND[i] % 13; if (cardval == 0) { cardval = 13; } takemast = Math.floor(RND[i] / 13) + 1; if (RND[i] % 13 == 0) { takemast = Math.floor(RND[i] / 13); } kolodaOst[i].VALUE = cardValueAr[cardval - 1]; kolodaOst[i].MAST = takemast; cardBack[i] = card1_mc.duplicateMovieClip('cardB' + i, 200 + i); cardBack[i].cacheAsBitmap = true; cardBack[i]._x = kolodaOst[i]._x; cardBack[i]._y = kolodaOst[i]._y; ++i; } i = 1; while (i <= 5) { Cards[i] = kolodaOst[cardquant - i + 1]; cardBackM[i] = cardBack[cardquant - i + 1]; placedI[i] = false; cdMcFlf[i] = false; discardFlags[i] = false; rplcFlg[i] = false; ++i; } i = 1; while (i <= 5) { crdDx[i] = (cardPlace[i]._x - Cards[i]._x) / 25; crdDy[i] = (cardPlace[i]._y - Cards[i]._y) / 25; ++i; } i = 0; while (i <= 5) { j = 0; while (j <= 1) { FllHsArr[i][j] = i; ++j; } ++i; } cdMcFlf[1] = true; cf = 0; colodaquant = cardquant; Bet_btn._visible = false; S1_btn._visible = false; S5_btn._visible = false; S10_btn._visible = false; Testdata_mc._visible = false; NextLevel_mc._visible = false; LevelDown_mc._visible = false; placeBet_mc._visible = false; BetShine_mc._visible = false; Next_btn._visible = false; DiscardTXT_mc._visible = false; BanOopsNext_mc._visible = false; Discard_btn._visible = false; deal_btn._visible = false; Dot_btn._visible = false; cBtn1._visible = false; cBtn2._visible = false; cBtn3._visible = false; cBtn4._visible = false; cBtn5._visible = false; BanComb_txt._visible = false; flushFlag = false; RoyalFlushFlag = false; straitFlushFlag = false; straitFlag = false; } function randomarray() { var v3 = new Array(ArrLim); var v5 = ArrLim; var v4; var v2; var v1; v2 = 1; while (v2 <= ArrLim) { v3[v2] = v2; ++v2; } v2 = 1; while (v2 <= ArrLim) { v4 = randRange(1, v5); RND[v2] = v3[v4]; --v5; v1 = v4; while (v1 < ArrLim) { v3[v1] = v3[v1 + 1]; ++v1; } ++v2; } } function randRange(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } if (!PokerPlayFlag) { } var MyBet = 0; var OppBank = 500; var LEVEL = 1; var VictoryLevel = 6; var LevelCost = 100; var i; var j; var Dz = 0; var ii = 0; var cardval; var ArrLim = 52; var RND = new Array(53); var kolodaOst = new Array(); var kolodaAr = new Array(); var cardAr = new Array(); var cardnamesAr = new Array('A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'); var cardValueAr = new Array(14, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); var TXTvals = new Array('0', '1', 'TWOS', 'THREES', 'FOURS', 'FIVES', 'SIXS', 'SEVENS', 'EIGHTS', 'NINES', 'TENS', 'JACKS', 'QUEENS', 'KINGS', 'ACES'); var TXTmast = new Array('0', 'DIAMONDS', 'HEARTS', 'SPADES', 'CLUBS'); var Display = new Array(53); var cardBack = new Array(53); var gameStep = 0; var stepMem = 1000; var winFlag = false; var kolodaFlag = false; var afterRazd = false; var N = 1; var cardquant = 52; var colodaquant = cardquant; var pot = 0; var koef = 1; var wt7 = 0; var wt8 = 0; var wtDwn = 0; var wtLev = 0; var wtLOSE = 0; var CoinsArr = new Array(100); var cCnt = 0; var cointMoveFlag = false; var cDx = 1; var cDy = -6; var crdDx = new Array(); var crdDy = new Array(); var Cards = new Array(6); var placedI = new Array(6); var placedQ = 0; var cdMcFlf = new Array(6); var cf = 0; var pairVal = 0; var twoPairsVal = 0; var trixVal = 0; var quatroVal = 0; var pairsQnt = 0; var trixQnt = 0; var quatroQnt = 0; var nothing = true; var situaz = 0; var coinNew = new MovieClip(); var flushFlag = false; var RoyalFlushFlag = false; var straitFlushFlag = false; var straitFlag = false; var FHPairsQnt = 0; var FHTrizQnt = 0; var FullHouseFlag = false; var FHPairsVal = 0; var FHTrixVal = 0; var AllCoinsOut = false; var coinsLive = new Array(100); var StraightVals = new Array(15); var discardFlags = new Array(6); var rplcFlg = new Array(6); var replaceN = new Array(6); var cardBackM = new Array(6); var cardPlace = new Array(6); cardPlace[1] = cardPlace1_mc; cardPlace[2] = cardPlace2_mc; cardPlace[3] = cardPlace3_mc; cardPlace[4] = cardPlace4_mc; cardPlace[5] = cardPlace5_mc; var koloda = new Array(53); koloda[1] = bubnaA_mc; koloda[2] = bubna2_mc; koloda[3] = bubna3_mc; koloda[4] = bubna4_mc; koloda[5] = bubna5_mc; koloda[6] = bubna6_mc; koloda[7] = bubna7_mc; koloda[8] = bubna8_mc; koloda[9] = bubna9_mc; koloda[10] = bubna10_mc; koloda[11] = bubnaJ_mc; koloda[12] = bubnaQ_mc; koloda[13] = bubnaK_mc; koloda[14] = ChervaA_mc; koloda[15] = Cherva2_mc; koloda[16] = Cherva3_mc; koloda[17] = Cherva4_mc; koloda[18] = Cherva5_mc; koloda[19] = Cherva6_mc; koloda[20] = Cherva7_mc; koloda[21] = Cherva8_mc; koloda[22] = Cherva9_mc; koloda[23] = Cherva10_mc; koloda[24] = ChervaJ_mc; koloda[25] = ChervaQ_mc; koloda[26] = ChervaK_mc; koloda[27] = PikaA_mc; koloda[28] = Pika2_mc; koloda[29] = Pika3_mc; koloda[30] = Pika4_mc; koloda[31] = Pika5_mc; koloda[32] = Pika6_mc; koloda[33] = Pika7_mc; koloda[34] = Pika8_mc; koloda[35] = Pika9_mc; koloda[36] = Pika10_mc; koloda[37] = PikaJ_mc; koloda[38] = PikaQ_mc; koloda[39] = PikaK_mc; koloda[40] = TrefaA_mc; koloda[41] = Trefa2_mc; koloda[42] = Trefa3_mc; koloda[43] = Trefa4_mc; koloda[44] = Trefa5_mc; koloda[45] = Trefa6_mc; koloda[46] = Trefa7_mc; koloda[47] = Trefa8_mc; koloda[48] = Trefa9_mc; koloda[49] = Trefa10_mc; koloda[50] = TrefaJ_mc; koloda[51] = TrefaQ_mc; koloda[52] = TrefaK_mc; i = 1; while (i <= cardquant) { koloda[i]._visible = false; ++i; } var curntVal = 0; var FHAr2 = new Array(15); var FHcnt = 0; var WonBankFlag = false; var girlQ = 6; var girlArsQ = 3; var Girl1 = new Array(7); Girl1[1] = GB1; Girl1[2] = GB2; Girl1[3] = GB3; Girl1[4] = GB4; Girl1[5] = GB5; Girl1[6] = GB6; var Girl2 = new Array(7); Girl2[1] = GC1; Girl2[2] = GC2; Girl2[3] = GC3; Girl2[4] = GC4; Girl2[5] = GC5; Girl2[6] = GC6; var Girl3 = new Array(7); Girl3[1] = GD1; Girl3[2] = GD2; Girl3[3] = GD3; Girl3[4] = GD4; Girl3[5] = GD5; Girl3[6] = GD6; var GirlArr = new Array(7); i = 1; while (i <= girlQ) { Girl1[i]._visible = false; Girl2[i]._visible = false; Girl3[i]._visible = false; ++i; } var cGrl = randRange(1, 3); switch (cGrl) { case 1: GirlArr = Girl1; break; case 2: GirlArr = Girl2; break; case 3: GirlArr = Girl3; } var girlN = 1; Next_btn._visible = false; StripHer_btn._visible = false; PlayMore_btn._visible = false; if (SoundMind) { SoundOn_btn._visible = false; } levelUp_mc.setMask(levMask_mc); CoverInfo_mc.setMask(CovInfMask_mc); CoverBet_mc.setMask(CovBetMask); MoreHer_btn._visible = false; YouWin_mc._visible = false; YouLose_mc._visible = false; Rules_mc._visible = false; BanOopsNext_mc._visible = false; YouWinBank_mc._visible = false; FuckedTotal_txt.text = FuckedTotal; TotalGirls_txt.text = GilsDone + '/' + GirlsQ; if (CardHidePlace == 3) { CCard_mc._visible = true; } else { CCard_mc._visible = false; } cardOnPanel_mc._visible = false; if (CardTakeFlag == 3) { cardOnPanel_mc._visible = true; } initset(); cCnt = 0; gameStep = -2.5; deal_btn._visible = true; PressDeal_mc._visible = true; stop(); MainLog_mc.onEnterFrame = function () { gameStep_txt.text = gameStep; if (stepMem != gameStep) { } stepMem = gameStep; if (!winFlag) { if (gameStep == -2.5) { } if (gameStep == 0) { kolodaFlag = true; } if (gameStep == 1) { this._visible = false; S1_btn._visible = true; S5_btn._visible = true; S10_btn._visible = true; placeBet_mc._visible = true; gameStep = 2; } if (gameStep == 2) { } if (gameStep == 3) { i = 1; while (i <= 5) { if (cdMcFlf[i]) { if (!Cards[i].hitTest(cardPlace[i])) { Cards[i]._x += crdDx[i]; Cards[i]._y += crdDy[i]; cardBackM[i]._x = Cards[i]._x; cardBackM[i]._y = Cards[i]._y; } else { Cards[i]._x = cardPlace[i]._x; Cards[i]._y = cardPlace[i]._y; cardBackM[i]._x = Cards[i]._x; cardBackM[i]._y = Cards[i]._y; Cards[i]._visible = true; cardBackM[i]._visible = false; placedI[i] = true; } } ++i; } if (cf < 5) { ++cf; } cdMcFlf[cf] = true; placedQ = 0; i = 1; while (i <= 5) { if (placedI[i]) { ++placedQ; } ++i; } if (placedQ >= 5) { gameStep = 4; } } if (gameStep == 4) { DiscardTXT_mc._visible = true; Discard_btn._visible = true; cBtn1._visible = true; cBtn2._visible = true; cBtn3._visible = true; cBtn4._visible = true; cBtn5._visible = true; } if (gameStep == 5) { DiscardTXT_mc._visible = false; Discard_btn._visible = false; i = 1; while (i <= 5) { if (rplcFlg[i]) { if (!Cards[i].hitTest(cardPlace[i])) { Cards[i]._x = Cards[i]._x + crdDx[i] + i; Cards[i]._y += crdDy[i]; cardBackM[i]._x = Cards[i]._x; cardBackM[i]._y = Cards[i]._y; } else { Cards[i]._x = cardPlace[i]._x; Cards[i]._y = cardPlace[i]._y; cardBackM[i]._x = Cards[i]._x; cardBackM[i]._y = Cards[i]._y; Cards[i]._visible = true; cardBackM[i]._visible = false; placedI[i] = true; rplcFlg[i] = false; } } ++i; } placedQ = 0; i = 1; while (i <= 5) { if (placedI[i]) { ++placedQ; } ++i; } if (placedQ >= 5) { gameStep = 6; } } if (gameStep == 6) { if (wt7 == 0) { pairVal = 0; twoPairsVal = 0; trixVal = 0; quatroVal = 0; pairsQnt = 0; trixQnt = 0; quatroQnt = 0; nothing = true; straitFlag = false; flushFlag = false; straitFlushFlag = false; RoyalFlushFlag = false; i = 1; while (i <= 5) { Cards[i].pair = 0; Cards[i].tri = 0; Cards[i].quatro = 0; ++i; } i = 0; while (i <= 15) { StraightVals[i] = 0; ++i; } FHPairsQnt = 0; FHTrizQnt = 0; FullHouseFlag = false; FHPairsVal = 0; FHTrixVal = 0; i = 0; while (i <= 14) { FHAr2[i] = 0; ++i; } i = 1; while (i <= 5) { ++FHAr2[Cards[i].VALUE]; ++i; } i = 2; while (i <= 14) { if (FHAr2[i] > 1) { ++FHPairsQnt; if (FHAr2[i] == 2) { FHPairsVal = i; } if (FHAr2[i] == 3) { FHTrixVal = i; ++FHTrizQnt; } } ++i; } if (FHPairsQnt > 1 && FHTrizQnt == 1) { FullHouseFlag = true; } i = 1; while (i <= 5) { StraightVals[Cards[i].VALUE] = Cards[i].MAST; FlushMast = Cards[i].MAST; j = i + 1; while (j <= 5) { if (i != j) { if (Cards[i].VALUE == Cards[j].VALUE) { nothing = false; if (pairVal != Cards[i].VALUE) { twoPairsVal = pairVal; ++pairsQnt; } pairVal = Cards[i].VALUE; if (Cards[i].pair > 0) { if (Cards[i].tri > 0) { Cards[i].quatro = j; Cards[i].tri = 0; ++quatroQnt; quatroVal = Cards[i].VALUE; trixQnt = 0; trixVal = 0; } else { Cards[i].tri = j; ++trixQnt; trixVal = Cards[i].VALUE; --pairsQnt; } } else { Cards[i].pair = j; } } } ++j; } ++i; } FlushMast = Cards[1].MAST; if (Cards[2].MAST == FlushMast && Cards[3].MAST == FlushMast && Cards[4].MAST == FlushMast && Cards[5].MAST == FlushMast) { flushFlag = true; nothing = false; } i = 0; while (i <= 15) { if (StraightVals[i] > 0) { if (StraightVals[i + 1] > 0 && StraightVals[i + 2] > 0 && StraightVals[i + 3] > 0 && StraightVals[i + 4] > 0) { straitFlag = true; nothing = false; if (StraightVals[i] == FlushMast && StraightVals[i + 1] == FlushMast && StraightVals[i + 2] == FlushMast && StraightVals[i + 3] == FlushMast && StraightVals[i + 4] == FlushMast) { straitFlushFlag = true; straitFlag = false; flushFlag = false; nothing = false; if (i == 10) { RoyalFlushFlag = true; straitFlushFlag = false; straitFlag = false; flushFlag = false; nothing = false; } } } } ++i; } ++wt7; } } if (gameStep == 7) { situaz = 0; if (nothing) { BanOopsNext_mc._visible = true; situaz = 0; } if (quatroQnt > 0) { BanComb_txt.text = 'FOUR OF A KIND: ' + TXTvals[quatroVal]; BanComb_txt._visible = true; flushFlag = false; pairsQnt = 0; trixQnt = 0; situaz = 8; } if (flushFlag) { pairsQnt = 0; trixQnt = 0; BanComb_txt.text = 'FLUSH: ' + TXTmast[FlushMast]; BanComb_txt._visible = true; situaz = 6; } if (straitFlag) { pairsQnt = 0; trixQnt = 0; BanComb_txt.text = 'STRAIGHT'; BanComb_txt._visible = true; situaz = 5; } if (straitFlushFlag) { pairsQnt = 0; trixQnt = 0; BanComb_txt.text = 'STRAIGHT FLUSH'; BanComb_txt._visible = true; situaz = 9; } if (RoyalFlushFlag) { pairsQnt = 0; trixQnt = 0; BanComb_txt.text = 'ROYAL FLUSH'; BanComb_txt._visible = true; situaz = 10; } if (FullHouseFlag) { pairsQnt = 0; trixQnt = 0; BanComb_txt.text = 'FULL HOUSE: ' + TXTvals[FHTrixVal] + ' AND ' + TXTvals[FHPairsVal]; BanComb_txt._visible = true; situaz = 7; } if (pairsQnt == 1) { if (pairVal >= 11) { pairsQnt = 0; BanComb_txt.text = 'JACKS OR BETTER: ' + TXTvals[pairVal]; BanComb_txt._visible = true; situaz = 2; } } if (pairsQnt == 1) { BanComb_txt.text = 'TWO OF A KIND: ' + TXTvals[pairVal]; BanComb_txt._visible = true; situaz = 1; } if (pairsQnt == 2) { if (twoPairsVal > pairVal) { BanComb_txt.text = 'TWO PAIRS: ' + TXTvals[twoPairsVal] + ' AND ' + TXTvals[pairVal]; } else { BanComb_txt.text = 'TWO PAIRS: ' + TXTvals[pairVal] + ' AND ' + TXTvals[twoPairsVal]; } BanComb_txt._visible = true; situaz = 3; } if (trixQnt == 1) { BanComb_txt.text = 'THREE OF A KIND: ' + TXTvals[trixVal]; BanComb_txt._visible = true; situaz = 4; } switch (situaz) { case 0: koef = -1; break; case 1: koef = 1; break; case 2: koef = 2; break; case 3: koef = 3; break; case 4: koef = 4; break; case 5: koef = 5; break; case 6: koef = 6; break; case 7: koef = 10; break; case 8: koef = 20; break; case 9: koef = 50; break; case 10: koef = 250; } if (situaz > 0) { cointMoveFlag = true; coinsSound_mc.play(); gameStep = 8; } else { gameStep = 9; bumpSnd_mc.play(); } } if (gameStep == 8) { gameStep = 9; } if (gameStep == 9) { MyBank = MyBank + pot + pot * koef; MyBank_txt.text = MyBank; OppBank -= pot * koef; pot = 0; Pot_txt.text = pot; gameStep = 10; if (LEVEL < VictoryLevel) { deal_btn._visible = true; if (OppBank < 0) { deal_btn._visible = false; YouWinBank_mc._visible = true; WonBankFlag = true; } } if (MyBank <= 0) { if (LEVEL == 1) { LevelDown_mc._visible = true; OopsSnd2_mc.play(); OpenMore = true; PlayMore_btn._visible = true; CloseVideo = true; CovVidFlag = false; ++wtLOSE; CloseDeal = true; OpenDeal = false; deal_btn._visible = false; winFlag = true; } if (LEVEL > 1) { --LEVEL; GirlArr[girlN]._visible = false; girlN = LEVEL; GirlArr[girlN]._visible = true; LevChngFlag = true; LevelDown_mc._visible = true; OopsSnd2_mc.play(); gameStep = 12; ++wtDwn; } } if (MyBank > LevelCost) { if (LEVEL < VictoryLevel) { StripHer_btn._visible = true; gameStep = 11; } } } } }; timer_mc.onEnterFrame = function () { if (wt7 > 0) { ++wt7; if (wt7 >= 25) { wt7 = 0; gameStep = 7; } } if (wtLev > 0) { ++wtLev; if (wtLev >= 50) { wtLev = 0; NextLevel_mc._visible = false; } } if (wtDwn > 0) { ++wtDwn; if (wtDwn >= 80) { wtDwn = 0; pot = 0; Pot_txt.text = pot; MyBank_txt.text = MyBank; cCnt = 0; ++wtLOSE; CloseTrns = true; } } if (wtLOSE > 0) { YouLose_mc._visible = true; wtLOSE = 0; } }; koloda_mc.onEnterFrame = function () { if (kolodaFlag) { if (colodaquant > 0) { kolodaOst[N]._x = CardPoint3_mc._x; kolodaOst[N]._y = CardPoint3_mc._y + N * 4; cardBack[N]._x = kolodaOst[N]._x; cardBack[N]._y = kolodaOst[N]._y; ++N; --colodaquant; kolodaOst[N]._x = CardPoint3_mc._x; kolodaOst[N]._y = CardPoint3_mc._y + N * 4; cardBack[N]._x = kolodaOst[N]._x; cardBack[N]._y = kolodaOst[N]._y; ++N; --colodaquant; } else { afterRazd = true; } if (afterRazd) { afterRazd = false; kolodaFlag = false; N = 1; gameStep = 1; } } }; YouWin_mc.onEnterFrame = function () { if (this._visible) { this._xscale += 1; this._yscale = this._xscale; if (this._xscale > 200) { this._visible = false; this._xscale = 100; } } }; YouLose_mc.onEnterFrame = function () { if (this._visible) { this._xscale += 1; this._yscale = this._xscale; if (this._xscale > 200) { this._visible = false; this._xscale = 100; } } }; YouWinBank_mc.onEnterFrame = function () { if (this._visible) { this._xscale += 1; this._yscale = this._xscale; if (this._xscale > 200) { this._visible = false; this._xscale = 100; } } }; StripHer_btn.onRelease = function () { if (gameStep == 11) { MyBank -= LevelCost; OppBank += LevelCost; pot = 0; Pot_txt.text = pot; MyBank_txt.text = MyBank; deal_btn._visible = true; NextLevel_mc._visible = true; VictorySound_mc.play(); ++wtLev; ++LEVEL; GirlArr[girlN]._visible = false; girlN = LEVEL; GirlArr[girlN]._visible = true; LevChngFlag = true; i = 1; while (i <= 5) { Cards[i]._visible = false; ++i; } BanComb_txt._visible = false; if (LEVEL == VictoryLevel) { PlayMore_btn._visible = true; winFlag = true; OpenMore = true; YouWin_mc._visible = true; deal_btn._visible = false; } this._visible = false; if (WonBankFlag) { deal_btn._visible = false; if (MyBank > LevelCost) { if (LEVEL < VictoryLevel) { this._visible = true; } } } } }; Bet_btn.onRelease = function () { if (gameStep == 1) { this._visible = false; S1_btn._visible = true; S5_btn._visible = true; S10_btn._visible = true; gameStep = 2; } }; S1_btn.onRelease = function () { if (gameStep == 2) { info_txt.text = ''; GirlArr[girlN]._visible = true; MyBet = 10; if (MyBet > 0 && MyBet <= MyBank) { pot = 10; Pot_txt.text = pot; MyBank -= pot; MyBank_txt.text = MyBank; S1_btn._visible = false; S5_btn._visible = false; S10_btn._visible = false; BetShine_mc._visible = false; placeBet_mc._visible = false; gameStep = 3; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } } }; S5_btn.onRelease = function () { if (gameStep == 2) { info_txt.text = ''; GirlArr[girlN]._visible = true; MyBet = 20; if (MyBet > 0 && MyBet <= MyBank) { pot = 20; Pot_txt.text = pot; MyBank -= pot; MyBank_txt.text = MyBank; S1_btn._visible = false; S5_btn._visible = false; S10_btn._visible = false; BetShine_mc._visible = false; placeBet_mc._visible = false; gameStep = 3; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } } }; S10_btn.onRelease = function () { if (gameStep == 2) { info_txt.text = ''; GirlArr[girlN]._visible = true; MyBet = 50; if (MyBet > 0 && MyBet <= MyBank) { pot = 50; Pot_txt.text = pot; MyBank -= pot; MyBank_txt.text = MyBank; S1_btn._visible = false; S5_btn._visible = false; S10_btn._visible = false; BetShine_mc._visible = false; placeBet_mc._visible = false; gameStep = 3; } else { bumpSnd_mc.play(); info_txt.text = 'Not enough money!'; } } }; cBtn1.onRelease = function () { if (gameStep == 4) { if (Cards[1]._visible) { Cards[1]._visible = false; cardBackM[1]._visible = true; discardFlags[1] = true; } else { if (cardBackM[1]._visible) { Cards[1]._visible = true; cardBackM[1]._visible = false; discardFlags[1] = false; } } } }; cBtn2.onRelease = function () { if (gameStep == 4) { if (Cards[2]._visible) { Cards[2]._visible = false; cardBackM[2]._visible = true; discardFlags[2] = true; } else { if (cardBackM[2]._visible) { Cards[2]._visible = true; cardBackM[2]._visible = false; discardFlags[2] = false; } } } }; cBtn3.onRelease = function () { if (gameStep == 4) { if (Cards[3]._visible) { Cards[3]._visible = false; cardBackM[3]._visible = true; discardFlags[3] = true; } else { if (cardBackM[3]._visible) { Cards[3]._visible = true; cardBackM[3]._visible = false; discardFlags[3] = false; } } } }; cBtn4.onRelease = function () { if (gameStep == 4) { if (Cards[4]._visible) { Cards[4]._visible = false; cardBackM[4]._visible = true; discardFlags[4] = true; } else { if (cardBackM[4]._visible) { Cards[4]._visible = true; cardBackM[4]._visible = false; discardFlags[4] = false; } } } }; cBtn5.onRelease = function () { if (gameStep == 4) { if (Cards[5]._visible) { Cards[5]._visible = false; cardBackM[5]._visible = true; discardFlags[5] = true; } else { if (cardBackM[5]._visible) { Cards[5]._visible = true; cardBackM[5]._visible = false; discardFlags[5] = false; } } } }; Discard_btn.onRelease = function () { if (gameStep == 4) { j = 0; i = 1; while (i <= 5) { if (discardFlags[i]) { Cards[i]._y = 690; cardBackM[i]._y = Cards[i]._y; cardBackM[i]._visible = false; ++j; Cards[i] = kolodaOst[cardquant - 5 - j + 1]; cardBackM[i] = cardBack[cardquant - 5 - j + 1]; placedI[i] = false; rplcFlg[i] = true; replaceN[j] = i; } ++i; } this._visible = false; cBtn1._visible = false; cBtn2._visible = false; cBtn3._visible = false; cBtn4._visible = false; cBtn5._visible = false; gameStep = 5; } }; deal_btn.onRelease = function () { PressDeal_mc._visible = false; StripPoker_mc._visible = false; if (MyBank > 100) { StripHer_btn._visible = false; } this._visible = false; initset(); gameStep = 0; }; Help_btn.onRelease = function () { Rules_mc._visible = !Rules_mc._visible; }; End_btn.onRelease = function () { i = 1; while (i <= cardquant) { cardBack[i].removeMovieClip(); ++i; } gotoAndPlay('introPlay'); }; PlayMore_btn.onRelease = function () { i = 0; while (i <= cCnt) { CoinsArr[i].removeMovieClip(); ++i; } initset(); }; MoreGames_btn.onRelease = function () { getURL('http://gamcore.com', '_blank'); }; SoundOff_btn.onRelease = function () { this._visible = false; SoundMind = false; SoundOn_btn._visible = true; }; SoundOn_btn.onRelease = function () { this._visible = false; SoundMind = true; SoundOff_btn._visible = true; }; RulesComb_mc.X_btn.onRelease = function () { RulesComb_mc._visible = false; Dot_btn._visible = true; }; Dot_btn.onRelease = function () { RulesComb_mc._visible = true; Dot_btn._visible = false; }; var levCng = false; var memY = levelUp_mc.level_txt._y; var Licr = 2; levelUp_mc.onEnterFrame = function () { if (levOld != LEVEL) { this.levelN_txt.text = LEVEL; levCng = true; if (LEVEL > levOld) { Licr = 2; } else { Licr = -2; this.levelN_txt._y = this.level_txt._y - 30; } } if (levCng) { this.level_txt._y -= Licr; this.levelN_txt._y -= Licr; if (Licr > 0) { if (this.levelN_txt._y <= memY) { this.level_txt.text = LEVEL; this.level_txt._y = memY; this.levelN_txt._y = this.level_txt._y + 30; levCng = false; levOld = LEVEL; } } else { if (this.levelN_txt._y >= memY) { this.level_txt.text = LEVEL; this.level_txt._y = memY; this.levelN_txt._y = this.level_txt._y + 30; levCng = false; levOld = LEVEL; } } } }; Exit_btn.onRelease = function () { i = 1; while (i <= cardquant) { cardBack[i].removeMovieClip(); ++i; } introflag = true; LEVEL = 1; PokerPlayFlag = false; ReturnFlag = true; MyBank_txt.text = MyBank; Mouse.show(); gotoAndPlay('maincyc'); }; DarkFon_mc.onEnterFrame = function () { if (this._alpha > 0) { this._alpha -= 4; } else { this._visible = false; this._alpha = 100; } }; CCard_mc.onRelease = function () { if (CardTakeFlag == 0) { LuzaSound_mc.play(); CardTakeFlag = 1; CardHidePlace = 0; } }; var CcrdDx; var CcrdDy; CCard_mc.onEnterFrame = function () { if (CardTakeFlag == 1) { if (this._xscale < 20) { this._y -= 8; this._xscale += 1; this._yscale = this._xscale; } else { this._xscale = 20; this._yscale = this._xscale; CcrdDx = (this._x - cardOnPanel_mc._x) / 25; CcrdDy = (cardOnPanel_mc._y - this._y) / 25; CardTakeFlag = 2; } } if (CardTakeFlag == 2) { if (this._y < 600) { this._y += CcrdDy; if (this._x > cardOnPanel_mc._x) { this._x -= CcrdDx; } if (this._xscale > 10) { this._xscale -= 2; this._yscale = this._xscale; } } else { this._xscale = 10; this._yscale = this._xscale; this._x = cardOnPanel_mc._x; this._y = cardOnPanel_mc._y; this._visible = false; this._xscale = 10; this._yscale = this._xscale; cardOnPanel_mc._visible = true; CardTakeFlag = 3; } } }; } movieClip 2458 { } movieClip 2462 { } movieClip 2465 { } movieClip 2468 { } movieClip 2471 { } movieClip 2474 { } movieClip 2477 { } movieClip 2480 { } movieClip 2483 { } movieClip 2486 { } movieClip 2489 { } movieClip 2492 { } movieClip 2495 { } movieClip 2498 { } movieClip 2501 { } movieClip 2504 { } movieClip 2507 { } movieClip 2510 { } movieClip 2513 { } movieClip 2555 { } movieClip 2556 { } movieClip 2557 { } movieClip 2559 { } movieClip 2561 { } movieClip 2564 { } movieClip 2566 { } // unknown tag 88 length 126 movieClip 2571 { } movieClip 2576 { } movieClip 2584 { } movieClip 2585 { } // unknown tag 88 length 73 movieClip 2589 { } movieClip 2592 { } movieClip 2595 { }




http://swfchan.com/37/180105/info.shtml
Created: 8/8 -2019 02:38:02 Last modified: 8/8 -2019 02:38:02 Server time: 20/04 -2024 15:00:05