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

A
Very
Merry Christmas!


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

Saving Private Dumpty pt1.swf

This is the info page for
Flash #66777

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


ActionScript [AS1/AS2]
Combined Code
movieClip 6 { } movieClip 7 { } movieClip 1 { frame 1 { function UpdatePreloader(mc) { if (mc._parent.thePlayer == undefined) { loader_text.text = '0% loaded'; return undefined; } else { if (!objAdded) { objAdded = true; mc._alpha = 255; PreloaderInit(mc, mc._parent.thePlayer); } } loader_text.text = int(mc._parent.thePlayer.playback.GetPercentage() * 100) / 100 + '% loaded'; if (mc._visible && mc._parent.thePlayer.playback.GetPercentage() >= 100 && !isLoaded) { mc._parent.thePlayer.Play(); mc._visible = false; isLoaded = true; } } function RelocateControls(tw, th) { preloader._x = tw / 2 - 90; preloader._y = th / 2 - 15.5 - loader_text._height / 2; loader_text._x = preloader._x - 5; loader_text._y = preloader._y + 31; } function PreloaderInit(mc, player) { var v2 = new Object(); v2.player = player; v2.mc = mc; v2.onEvent = function (sender, t, n, d) { if (n == 'onResize') { RelocateControls(sender.totalWidth, sender.totalHeight); } else { if (n == 'onBufferEmpty') { this.mc._visible = true; IsBuffering = true; } else { if (n == 'onBufferFull') { this.mc._visible = false; IsBuffering = false; } else { if (n == 'onPlaying') { if (this.player.param.targetType == 'eflv') { this.mc._visible = false; } } } } } }; player.AddListener(v2); player.AdjustControls(); } var objAdded = false; var isLoaded = false; var IsBuffering = true; this.tmrUpdate = setInterval(UpdatePreloader, 100, this); RelocateControls(Stage.width, Stage.height); } } movieClip 11 { } movieClip 16 { } movieClip 9 { frame 1 { function UpdatePreloader(mc) { if (mc._parent.thePlayer == undefined) { return undefined; } else { if (!mc.objAdded) { mc.objAdded = true; clearInterval(mc.tmrUpdate); mc.thePlayer = mc._parent.thePlayer; mc._alpha = 100; Init(mc, mc._parent.thePlayer); } } } function RelocateControls(player) { var v2 = 0; var v3 = 0; var v5; var v4; if (player.param.playBtnW != undefined) { v5 = player.param.playBtnW; } if (player.param.playBtnH != undefined) { v4 = player.param.playBtnH; } if (v5 == undefined) { v5 = player.totalWidth / 5; } if (v4 == undefined) { v4 = player.totalWidth / 5; } if (player.param.playBtnAlign == 'top-left') { v2 = 0; v3 = 0; } else { if (player.param.playBtnAlign == 'top-center') { v2 = player.totalWidth / 2 - v5 / 2; } else { if (player.param.playBtnAlign == 'top-right') { v2 = player.totalWidth - v5; } else { if (player.param.playBtnAlign == 'left-center') { v3 = player.totalHeight / 2 - v4 / 2; } else { if (player.param.playBtnAlign == 'right-center') { v2 = player.totalWidth - v5; v3 = player.totalHeight / 2 - v4 / 2; } else { if (player.param.playBtnAlign == 'center') { v2 = player.totalWidth / 2 - v5 / 2; v3 = player.totalHeight / 2 - v4 / 2; } else { if (player.param.playBtnAlign == 'bottom-left') { v2 = 0; v3 = player.totalHeight - v4; } else { if (player.param.playBtnAlign == 'bottom-center') { v2 = player.totalWidth / 2 - v5 / 2; v3 = player.totalHeight - v4; } else { if (player.param.playBtnAlign == 'bottom-right') { v2 = player.totalWidth - v5; v3 = player.totalHeight - v4; } } } } } } } } } if (player.param.playBtnAlignX != undefined) { v2 += player.param.playBtnAlignX; } if (player.param.playBtnAlignY != undefined) { v3 += player.param.playBtnAlignY; } playbtn._width = v5; playbtn._height = v4; if (v2 + v5 > player.totalWidth) { v2 = player.totalWidth - v5; } if (v2 < 0) { v2 = 0; } if (v3 + v4 > player.totalHeight) { v3 = player.totalHeight - v4; } if (v3 < 0) { v3 = 0; } playbtn._x = v2; playbtn._y = v3; grayLayer._x = 0; grayLayer._y = 0; grayLayer._width = player.totalWidth; grayLayer._height = player.totalHeight; } function Init(mc, player) { var v2 = new Object(); v2.player = player; v2.mc = mc; v2.onEvent = function (sender, t, n, d) { if (n == 'onResize') { RelocateControls(this.player); } if (this.player.GetState() == 'play') { this.mc.playbtn._visible = false; this.mc.grayLayer._visible = false; } else { this.mc.playbtn._visible = true; this.mc.grayLayer._visible = true; } }; player.AddListener(v2); player.AdjustControls(); } var objAdded = false; var thePlayer; playbtn._visible = false; pausebtn._visible = false; this.tmrUpdate = setInterval(UpdatePreloader, 100, this); } instance playbtn of movieClip 16 { onClipEvent (press) { _parent.thePlayer.Play(); } } } frame 1 { TemplateParams_Header_TITLE = ''; TemplateParams_Header_DIRECTOR = ''; TemplateParams_Header_DESCRIPTION = '\r\n'; TemplateParams_Tailer_DESCRIPTION = '\r\n'; if (playerOpts != undefined) { playerOpts = 'scaleMode*stage*s||pauseAtFirstFrame*true*b||pauseAtLastFrame*false*b||playerAlign*bottom*s||playerOverMovie*false*b||playerAutoHide*false*b||hideDelay*5000*i||autoHideMouse*false*b||panelColor*undefined*e||bufferTime*5*i||sndMute*false*b||sndVolume*100*i||showReplay*false*b||textReplay*Replay*s||autoLoad*false*b||unloadOnStop*false*b||autoRewind*false*b||thumbNail*main edit COMPRESSED_FirstFrame.jpg*s||showPlayer*true*b||keepAspect*false*b||minWidth*0*i||minHeight*0*i||noMuteBtn*false*b||noStopBtn*false*b||noProcBar*false*b||noVolumeBar*false*b||noTimeText*false*b||playBtnAlign*center*s||playerExt**s||fscEvent*false*b||frameStart*2*i||frameEnd*7129*i||targetFPS*25*i||targetType*eflv*s||targetClip*this*e||totalWidth*300*i||totalHeight*204*i||' + playerOpts; } else { playerOpts = 'scaleMode*stage*s||pauseAtFirstFrame*true*b||pauseAtLastFrame*false*b||playerAlign*bottom*s||playerOverMovie*false*b||playerAutoHide*false*b||hideDelay*5000*i||autoHideMouse*false*b||panelColor*undefined*e||bufferTime*5*i||sndMute*false*b||sndVolume*100*i||showReplay*false*b||textReplay*Replay*s||autoLoad*false*b||unloadOnStop*false*b||autoRewind*false*b||thumbNail*main edit COMPRESSED_FirstFrame.jpg*s||showPlayer*true*b||keepAspect*false*b||minWidth*0*i||minHeight*0*i||noMuteBtn*false*b||noStopBtn*false*b||noProcBar*false*b||noVolumeBar*false*b||noTimeText*false*b||playBtnAlign*center*s||playerExt**s||fscEvent*false*b||frameStart*2*i||frameEnd*7129*i||targetFPS*25*i||targetType*eflv*s||targetClip*this*e||totalWidth*300*i||totalHeight*204*i||'; } } frame 1 { function FillOnListener(obj) { obj.arrListener = new Array(); obj.AddListener = function (l) { var v2 = 0; v2 = 0; while (v2 < this.arrListener.length) { if (this.arrListener[v2] == l) { return undefined; } ++v2; } this.arrListener[this.arrListener.length] = l; }; obj.RemoveListener = function (l) { var v2 = 0; v2 = 0; while (v2 < this.arrListener.length) { if (this.arrListener[v2] == l) { this.arrListener.splice(v2, 1); return undefined; } ++v2; } }; obj.DispatchEvent = function (event_type, event_name, info) { var v2 = 0; v2 = 0; while (v2 < this.arrListener.length) { if (this.arrListener[v2].onEvent != undefined) { this.arrListener[v2].onEvent(this, event_type, event_name, info); } ++v2; } }; } function CreateBaseCtrl(parent, skin_mc) { var v2 = new Object(); if (parent == undefined) { v2.parent_mc = undefined; } else { v2.parent_mc = parent.skin_mc; } FillOnListener(v2); v2.parent = parent; v2.skin_mc = skin_mc; v2.xachor = 0; v2.yachor = 0; v2.x = 0; v2.y = 0; v2.rx = 0; v2.ry = 0; v2.width = 0; v2.height = 0; v2.children = new Array(); v2.enabled = true; v2.visible = true; if (parent != undefined) { parent.addControl(v2); } v2.UpdateControlPos = function () { if (this.parent == undefined) { this.rx = this.x; this.ry = this.y; if (this.onSizeChanged != undefined) { this.onSizeChanged(); } var v2 = 0; v2 = 0; while (v2 < this.children.length) { this.children[v2].UpdateControlPos(); ++v2; } return undefined; } if (this.leftBand != undefined || this.rightBand != undefined) { this.xachor = 0; if (this.leftBand != undefined) { this.x = this.leftBand; } else { this.x = 0; } if (this.rightBand != undefined) { this.width = this.parent.width - this.rightBand - this.x; } else { this.width = this.parent.width - this.x; } } if (this.topBand != undefined || this.bottomBand != undefined) { this.yachor = 0; if (this.topBand != undefined) { this.y = this.topBand; } else { this.y = 0; } if (this.bottomBand != undefined) { this.height = this.parent.height - this.bottomBand - this.y; } else { this.height = this.parent.height - this.y; } } if (this.xachor == 0) { this.rx = this.x + this.parent.rx; } else { if (this.xachor == 1) { this.rx = this.parent.rx + this.parent.width + this.x; } else { if (this.xachor == 2) { this.rx = this.parent.rx + this.x + this.parent.width / 2; } } } if (this.yachor == 0) { this.ry = this.y + this.parent.ry; } else { if (this.yachor == 1) { this.ry = this.parent.height + this.y + this.parent.ry; } else { if (this.yachor == 2) { this.ry = this.parent.ry + this.parent.height / 2 + this.y; } } } if (this.onSizeChanged != undefined) { this.onSizeChanged(); } v2 = 0; v2 = 0; while (v2 < this.children.length) { this.children[v2].UpdateControlPos(); ++v2; } }; v2.SetAchor = function (xa, ya) { if (xa == 0 || xa == 1 || xa == 2) { this.xachor = xa; } if (ya == 0 || ya == 1 || ya == 2) { this.yachor = ya; } this.UpdateControlPos(); }; v2.SetPosition = function (x, y, w, h) { this.x = x; this.y = y; this.width = w; this.height = h; this.UpdateControlPos(); }; v2.SetBand = function (l, r, t, b) { this.leftBand = l; this.topBand = t; this.rightBand = r; this.bottomBand = b; this.UpdateControlPos(); }; v2.addControl = function (c) { var v2 = 0; v2 = 0; while (v2 < this.children.length) { if (this.children[v2] == c) { return undefined; } ++v2; } this.children[this.children.length] = c; }; v2.RemoveFromParent = function (c) { if (this.parent == undefined) { return undefined; } var v2; v2 = 0; while (v2 < this.parent.children.length) { if (this.parent.children[v2] == c) { this.parent.children.splice(v2, 1); return undefined; } ++v2; } }; v2.SetVisible = function (bVisible) { this.visible = bVisible; if (this.onVisibleChanged != undefined) { this.onVisibleChanged(); } var v2 = 0; v2 = 0; while (v2 < this.children.length) { this.children[v2].onVisibleChanged(); ++v2; } }; v2.SetEnabled = function (bEnabled) { this.enabled = bEnabled; if (this.onEnabledChanged != undefined) { this.onEnabledChanged(); } var v2 = 0; v2 = 0; while (v2 < this.children.length) { this.children[v2].onEnabledChanged(); ++v2; } }; v2.CheckIfParentVisible = function () { var v2 = this; while (v2.parent != undefined) { if (!v2.parent.visible) { return false; } v2 = v2.parent; } return true; }; v2.CheckIfParentEnabled = function () { var v2 = this; while (v2.parent != undefined) { if (!v2.parent.enabled) { return false; } v2 = v2.parent; } return true; }; v2.Destroy = function () { this.onDestroy(); var v2 = 0; v2 = 0; while (v2 < this.children.length) { this.children[v2].Destroy(); ++v2; } RemoveFromParent(this); }; return v2; } function CreateButton(parent, skin_mc, name) { var v2 = CreateBaseCtrl(parent, skin_mc); v2.ctrl_type = 'Button'; v2.ctrl_name = name; v2.skin_mc._x = 0; v2.skin_mc._y = 0; skin_mc._xscale = 100; skin_mc._yscale = 100; skin_mc.button_mc._visible = false; v2.button_mc = skin_mc.button_mc.duplicateMovieClip('button_' + name, skin_mc.getNextHighestDepth()); v2.button = v2.button_mc.button; v2.button.externalObj = v2; v2.button_mc._visible = true; v2.button.onPress = function () { var v2 = this.externalObj; if (!v2.enabled || !v2.CheckIfParentEnabled()) { return undefined; } if (v2.onPress != undefined) { v2.onPress(); } }; v2.button.onRelease = function () { var v2 = this.externalObj; if (v2.onRelease != undefined) { v2.onRelease(); } }; v2.onDestroy = function () { this.button_mc.removeMovieClip(); }; v2.onSizeChanged = function () { this.button_mc._x = this.rx; this.button_mc._y = this.ry; this.button_mc._width = this.width; this.button_mc._height = this.height; }; v2.onVisibleChanged = function () { if (this.visible && this.CheckIfParentVisible()) { this.button_mc._visible = true; } else { this.button_mc._visible = false; } }; v2.onEnabledChanged = function () { if (this.enabled && this.CheckIfParentEnabled()) { this.button_mc.enabled = true; this.button_mc.button.enabled = true; this.button_mc.button.useHandCursor = true; } else { this.button_mc.enabled = false; this.button_mc.button.enabled = false; this.button_mc.button.useHandCursor = false; } }; return v2; } function CreateDualButton(parent, skin_mc, name) { var v2 = CreateBaseCtrl(parent, skin_mc); v2.ctrl_type = 'DualButton'; v2.ctrl_name = name; v2.skin_mc._x = 0; v2.skin_mc._y = 0; skin_mc._xscale = 100; skin_mc._yscale = 100; skin_mc.button_mc0._visible = false; skin_mc.button_mc1._visible = false; v2.button_mc0 = skin_mc.button_mc0.duplicateMovieClip('dualbutton' + name + '0', skin_mc.getNextHighestDepth()); if (skin_mc.button_mc1 == undefined) { v2.button_mc1 = skin_mc.button_mc0.duplicateMovieClip('dualbutton' + name + '1', skin_mc.getNextHighestDepth()); } else { v2.button_mc1 = skin_mc.button_mc1.duplicateMovieClip('dualbutton' + name + '1', skin_mc.getNextHighestDepth()); } v2.button0 = v2.button_mc0.button; v2.button1 = v2.button_mc1.button; v2.button0.externalObj = v2; v2.button1.externalObj = v2; v2.button_mc0._visible = true; v2.button_mc1._visible = false; v2.state = 'on'; v2.button0.onPress = function () { var v2 = this.externalObj; if (!v2.enabled || !v2.CheckIfParentEnabled()) { return undefined; } if (v2.state == 'on') { v2.state = 'off'; } else { v2.state = 'on'; } v2.UpdateUI(); if (v2.onPress != undefined) { v2.onPress(); } }; v2.button1.onPress = v2.button0.onPress; v2.button0.onRelease = function () { if (!o.enabled || !o.CheckIfParentEnabled()) { return undefined; } var o = this.externalObj; if (o.onRelease != undefined) { o.onRelease(); } }; v2.button1.onRelease = v2.button0.onRelease; v2.onSizeChanged = function () { this.button_mc0._x = this.rx; this.button_mc0._y = this.ry; this.button_mc0._width = this.width; this.button_mc0._height = this.height; this.button_mc1._x = this.rx; this.button_mc1._y = this.ry; this.button_mc1._width = this.width; this.button_mc1._height = this.height; }; v2.UpdateUI = function () { if (this.visible && this.CheckIfParentVisible()) { if (this.state == 'on') { this.button_mc0._visible = true; this.button_mc1._visible = false; } else { this.button_mc0._visible = false; this.button_mc1._visible = true; } } else { this.button_mc0._visible = false; this.button_mc1._visible = false; } if (this.enabled && this.CheckIfParentEnabled()) { this.button_mc0.button.enabled = true; this.button_mc1.button.enabled = true; } else { this.button_mc0.button.enabled = false; this.button_mc1.button.enabled = false; } }; v2.onEnabledChanged = function () { this.UpdateUI(); }; v2.onVisibleChanged = function () { this.UpdateUI(); }; v2.onDestroy = function () { this.button_mc0.removeMovieClip(); this.button_mc1.removeMovieClip(); }; v2.GetState = function () { return this.state; }; v2.SetState = function (s) { if (this.state == s) { return undefined; } this.state = s; this.UpdateUI(); }; return v2; } function CreatePanel(parent, skin_mc, name) { var v2 = CreateBaseCtrl(parent, skin_mc); v2.ctrl_type = 'Panel'; v2.ctrl_name = name; skin_mc._x = 0; skin_mc._y = 0; skin_mc._xscale = 100; skin_mc._yscale = 100; skin_mc.panel_mc._visible = false; v2.panel_mc = skin_mc.panel_mc.duplicateMovieClip('panel_' + name, skin_mc.getNextHighestDepth()); v2.align = 0; v2.panel_mc._visible = true; v2.panel_mc.externalObj = v2; v2.onSizeChanged = function () { if (this.align == 0) { } else { if (this.align == 1) { this.xachor = 0; this.yachor = 0; this.x = 0; this.y = 0; this.width = this.parent.width; } else { if (this.align == 2) { this.xachor = 0; this.yachor = 0; this.x = this.parent.width - this.width; this.y = 0; this.height = this.parent.height; } else { if (this.align == 3) { this.xachor = 0; this.yachor = 0; this.x = 0; this.y = this.parent.height - this.height; this.width = this.parent.width; } else { if (this.align == 4) { this.xachor = 0; this.yachor = 0; this.x = 0; this.y = 0; this.height = this.parent.height; } } } } } this.panel_mc._x = this.rx; this.panel_mc._y = this.ry; this.panel_mc._width = this.width; this.panel_mc._height = this.height; }; v2.SetAlign = function (nAlign) { this.align = nAlign; UpdateControlPos(); }; v2.onVisibleChanged = function () { if (this.visible && this.CheckIfParentVisible()) { this.panel_mc._visible = true; } else { this.panel_mc._visible = false; } }; v2.onEnabledChanged = function () { if (this.enabled && this.CheckIfParentEnabled()) { this.panel_mc.enabled = true; } else { this.panel_mc.enabled = false; } }; v2.SetOnPress = function (pfn) { this.onPress = pfn; if (pfn == undefined) { this.panel_mc.onPress = undefined; } else { this.panel_mc.onPress = function () { this.externalObj.onPress(); }; } }; v2.onDestroy = function () { this.panel_mc.removeMovieClip(); }; return v2; } function CreateSpin(parent, skin_mc, name) { var ctrl = CreateBaseCtrl(parent, skin_mc); ctrl.ctrl_type = 'Spin'; ctrl.ctrl_name = name; skin_mc._x = 0; skin_mc._y = 0; skin_mc._xscale = 100; skin_mc._yscale = 100; ctrl.track = skin_mc.track.duplicateMovieClip('track_' + name, skin_mc.getNextHighestDepth()); if (skin_mc.right != undefined) { ctrl.right = skin_mc.right.duplicateMovieClip('right_' + name, skin_mc.getNextHighestDepth()); } if (skin_mc.load != undefined) { ctrl.load = skin_mc.load.duplicateMovieClip('load_' + name, skin_mc.getNextHighestDepth()); } if (ctrl.right != undefined) { ctrl.right_mask = skin_mc.createEmptyMovieClip('right_mask_' + name, skin_mc.getNextHighestDepth()); ctrl.right_mask.beginFill(255); ctrl.right_mask.lineStyle(0, 16711935, 100); with (ctrl.right_mask) { moveTo(0, 0); lineTo(100, 0); lineTo(100, 5); lineTo(0, 5); lineTo(0, 0); } ctrl.right_mask.endFill(); } if (skin_mc.left != undefined) { ctrl.left = skin_mc.left.duplicateMovieClip('left_' + name, skin_mc.getNextHighestDepth()); } ctrl.thumb = skin_mc.thumb.duplicateMovieClip('thumb_' + name, skin_mc.getNextHighestDepth()); skin_mc.thumb._visible = false; skin_mc.track._visible = false; skin_mc.left._visible = false; skin_mc.right._visible = false; skin_mc.load._visible = false; ctrl.left._visible = true; ctrl.load._visible = true; ctrl.right._visible = false; ctrl.bShowLeft = true; ctrl.bShowRight = false; ctrl.thumb.button.externalObj = ctrl; ctrl.track.externalObj = ctrl; ctrl.Max = 10; ctrl.Min = 0; ctrl.Position = 0; ctrl.LoadPercent = 0; if (ctrl.right != undefined) { ctrl.right.setMask(ctrl.right_mask); } ctrl.thumb._height = int(ctrl.thumb._height); if (ctrl.thumb._height % 2 != 0) { ++ctrl.thumb._height; } ctrl.thumb.button.onPress = function () { var v2 = this.externalObj; if (!v2.enabled || !v2.CheckIfParentEnabled()) { return undefined; } var v4 = v2.track._x; var v3 = v2.track._y + v2.track._height / 2 - v2.thumb._height / 2; if (v2.onDragStart != undefined) { v2.onDragStart(); } v2.timerDrag = setInterval(v2.onDragInternal, 20, v2); startDrag(v2.thumb, false, v4, v3, v4 + v2.track._width - v2.thumb._width, v3); }; ctrl.thumb.button.onRelease = function () { var v2 = this.externalObj; stopDrag(); clearInterval(v2.timerDrag); if (!v2.enabled || !v2.CheckIfParentEnabled()) { return undefined; } v2.UpdateDrag(v2.thumb._x, v2.thumb._y); if (v2.onDragEnd != undefined) { v2.onDragEnd(); } }; ctrl.thumb.button.onReleaseOutside = ctrl.thumb.button.onRelease; ctrl.onDragInternal = function (obj) { var v2 = obj.Position; obj.Position = (obj.Max - obj.Min) * (obj.thumb._x - obj.track._x) / (obj.track._width - obj.thumb._width); obj.UpdateDrag(obj.thumb._x, obj.thumb._y); if (v2 != obj.Position) { if (obj.onDrag != undefined) { obj.onDrag(); } } if (!obj.thumb.button.enabled) { obj.thumb.button.onRelease(); } }; ctrl.track.onPress = function () { var v2 = this.externalObj; var v3 = v2.Position; v2.Position = (v2.Max - v2.Min) * (v2.track._xmouse * v2.track._xscale / 100) / v2.track._width; if (v3 != v2.Position) { if (v2.onDrag != undefined) { v2.onDrag(); } } v2.SetPos(v2.Position); }; ctrl.onSizeChanged = function () { this.track._x = this.rx; this.track._y = this.ry; this.track._width = this.width; this.track._height = this.height; this.SetPos(this.Position); }; ctrl.onEnabledChanged = function () { if (this.enabled && this.CheckIfParentEnabled()) { this.thumb.button.enabled = true; this.track.enabled = true; } else { this.thumb.button.enabled = false; this.track.enabled = false; } }; ctrl.onVisibleChanged = function () { if (this.visible && this.CheckIfParentVisible()) { this.thumb._visible = true; this.track._visible = true; this.left._visible = this.bShowLeft; this.right._visible = this.bShowRight; this.load._visible = true; } else { this.thumb._visible = false; this.track._visible = false; this.left._visible = false; this.right._visible = false; this.load._visible = false; } }; ctrl.onDestroy = function () { clearInterval(this.timerDrag); this.timerDrag = undefined; this.thumb.removeMovieClip(); this.right_mask.removeMovieClip(); this.track.removeMovieClip(); this.left.removeMovieClip(); this.right.removeMovieClip(); this.load.removeMovieClip(); }; ctrl.SetPos = function (nPos) { nPos = int(nPos); if (nPos < this.Min) { nPos = this.Min; } if (nPos > this.Max) { nPos = this.Max; } var v4 = this.track._x + (nPos - this.Min) * (this.track._width - this.thumb._width) / (this.Max - this.Min); var v3 = this.track._y + this.track._height / 2 - this.thumb._height / 2; this.UpdateDrag(v4, v3); this.Position = nPos; }; ctrl.UpdateDrag = function (dx, dy) { var v2; this.thumb._x = dx; this.thumb._y = dy; this.left._x = this.track._x; this.left._y = this.track._y; this.left._height = this.track._height; v2 = this.thumb._x + this.thumb._width / 2 - this.track._x; if (v2 < 0) { v2 = 0; } this.left._width = v2; this.right_mask._x = this.thumb._x + this.thumb._width / 2; this.right_mask._y = this.track._y; this.right_mask._height = this.track._height; v2 = this.track._width - (this.thumb._x + this.thumb._width / 2 - this.track._x); if (v2 < 0) { v2 = 0; } this.right_mask._width = v2; this.right._x = this.thumb._x; this.right._y = this.track._y; this.right._height = this.track._height; this.load._x = this.track._x; this.load._y = this.track._y; this.load._height = this.track._height; this.load._width = this.LoadPercent * this.track._width; }; ctrl.SetMaxMin = function (nMin, nMax) { if (nMax <= nMin) { return undefined; } this.Min = nMin; this.Max = nMax; this.SetPos(this.Position); }; ctrl.SetLoadPercent = function (p) { this.LoadPercent = p; this.UpdateDrag(this.thumb._x, this.thumb._y); }; ctrl.ShowLeft = function (bVisible) { this.bShowLeft = bVisible; this.onVisibleChanged(); }; ctrl.ShowRight = function (bVisible) { this.bShowRight = bVisible; this.onVisibleChanged(); }; return ctrl; } } frame 1 { function CreateMovieClipList(mcs, fpss) { var v2 = new Object(); v2.mcs = mcs; v2.fpss = fpss; v2.time_ranges = new Array(); v2.duration = 0; v2.curMC = 0; v2.bInitOK = false; v2.onEnterFrame = function () { var v2 = this.externalObj; if (!v2.bInitOK) { return undefined; } if (this._currentframe == 1) { if (v2.curMC == 0) { v2.onPlayStart(); } } if (this._currentframe == this._totalframes) { this.stop(); if (v2.curMC == v2.mcs.length - 1) { this.bIsPlaying = false; v2.onPlayEnd(); } else { this.onEnterFrame = undefined; this._visible = false; ++v2.curMC; v2.mcs[v2.curMC].onEnterFrame = v2.onEnterFrame; v2.mcs[v2.curMC]._visible = true; if (v2.bIsPlaying) { v2.mcs[v2.curMC].gotoAndPlay(1); } else { v2.mcs[v2.curMC].gotoAndStop(1); } } } }; var v3; v3 = 0; while (v3 < mcs.length) { mcs[v3]._visible = false; mcs[v3].externalObj = v2; v2.duration += mcs[v3]._totalframes / fpss[v3]; v2.time_ranges[v3] = v2.duration; ++v3; } v3 = 0; while (v3 < mcs.length) { mcs[v3].gotoAndStop(1); mcs[v3].onEnterFrame = undefined; ++v3; } mcs[0].onEnterFrame = v2.onEnterFrame; v2.bInitOK = true; v2.GetMCAt = function (t) { var v2; v2 = 0; while (v2 < this.time_ranges.length) { if (t < this.time_ranges[v2]) { return v2; } ++v2; } return undefined; }; v2.SetWH = function (w, h) { var v2; v2 = 0; while (v2 < this.mcs.length) { this.mcs[v2]._width = w; this.mcs[v2]._height = h; ++v2; } }; v2.SetXY = function (x, y) { var v2; v2 = 0; while (v2 < this.mcs.length) { this.mcs[v2]._x = x; this.mcs[v2]._y = y; ++v2; } }; v2.Play = function () { this.bIsPlaying = true; this.mcs[this.curMC].play(); }; v2.Stop = function () { this.bIsPlaying = false; this.mcs[this.curMC].stop(); }; v2.SetBufferTime = function (t) { var v2; v2 = 0; while (v2 < this.mcs.length) { this.mcs[v2]._soundbuftime = t; ++v2; } }; v2.Seek = function (t) { var v3 = this.GetMCAt(t); if (v3 == undefined) { return undefined; } this.mcs[this.curMC].stop(); this.mcs[this.curMC]._visible = false; this.mcs[this.curMC].onEnterFrame = undefined; this.curMC = v3; t = this.time_ranges[v3] - t; var v2 = int(t * this.fpss[v3]); if (v2 <= 0) { v2 = 0; } v2 = this.mcs[this.curMC]._totalframes - v2; if (v2 <= 0) { v2 = 1; } if (v2 >= this.mcs[this.curMC]._totalframes) { v2 = this.mcs[this.curMC]._totalframes; } this.mcs[this.curMC].onEnterFrame = this.onEnterFrame; this.mcs[this.curMC]._visible = true; if (this.bIsPlaying) { this.mcs[this.curMC].gotoAndPlay(v2); } else { this.mcs[this.curMC].gotoAndStop(v2); } }; v2.GetTime = function () { return this.time_ranges[this.curMC] - (this.mcs[this.curMC]._totalframes - this.mcs[this.curMC]._currentframe) / this.fpss[this.curMC]; }; return v2; } function CreateSWFPlayback(mcs, fpss) { var v2 = new Object(); FillOnListener(v2); v2.mcList = CreateMovieClipList(mcs, fpss); v2.duration = v2.mcList.duration; v2.State = 'stop'; v2.mcList.externalObj = v2; v2.Open = function () { this.mcList.Stop(); this.mcList.Seek(0); }; v2.Play = function () { this.mcList.Play(); this.State = 'play'; if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); } this.tmrPlay = setInterval(this.onTimerPlay, 100, this); }; v2.Pause = function () { this.mcList.Stop(); this.State = 'pause'; if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); this.tmrPlay = undefined; } }; v2.Stop = function () { this.mcList.Stop(); this.State = 'stop'; if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); this.tmrPlay = undefined; } }; v2.Seek = function (t) { this.mcList.Seek(t); }; v2.GetState = function () { return this.State; }; v2.GetDuration = function () { return this.duration; }; v2.GetVideoWidth = function () { return 1; }; v2.GetVideoHeight = function () { return 1; }; v2.GetX = function () { return this.mcList.mcs[0]._x; }; v2.GetY = function () { return this.mcList.mcs[0]._y; }; v2.SetXY = function (x, y) { this.mcList.SetXY(x, y); }; v2.GetWidth = function () { return this.mcList.mcs[0]._width; }; v2.GetHeight = function () { return this.mcList.mcs[0]._height; }; v2.SetWidth = function (w) { this.mcList.SetWH(w, -1); }; v2.SetHeight = function (h) { this.mcList.SetWH(-1, h); }; v2.GetTime = function () { return this.mcList.GetTime(); }; v2.SetBufferTime = function (t) { this.mcList.SetBufferTime(t); }; v2.GetPercentage = function () { return 0; }; v2.onTimerPlay = function (obj) { obj.DispatchEvent('SWFPB', 'onPlaying', undefined); }; v2.mcList.onPlayStart = function () { var v2 = this.externalObj; if (!v2.bOnPlayStartSent) { v2.bOnPlayStartSent = true; v2.DispatchEvent('SWFPB', 'onPlayStart', undefined); } }; v2.mcList.onPlayEnd = function () { var v2 = this.externalObj; if (v2.State == 'play') { v2.DispatchEvent('SWFPB', 'onPlayEnd', undefined); } }; return v2; } function CreateEFLVPlayback(mc, fps, fstart, fend) { var v2 = new Object(); FillOnListener(v2); v2.duration = (fend - fstart + 1) / fps; v2.State = 'stop'; v2.mc = mc; v2.mc.externalObj = v2; v2.fstart = fstart; v2.fend = fend; v2.fps = fps; v2.bOnPlayStartSent = false; v2.Open = function () {}; v2.Close = function () { this.Stop(); }; v2.Play = function () { this.mc.play(); this.State = 'play'; if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); } this.tmrPlay = setInterval(this.onTimerPlay, 100, this); }; v2.Pause = function () { this.mc.stop(); this.State = 'pause'; if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); this.tmrPlay = undefined; } }; v2.Stop = function () { this.mc.stop(); this.State = 'stop'; if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); this.tmrPlay = undefined; } }; v2.Seek = function (t) { var v2 = int(t * this.fps + this.fstart); if (v2 < this.fstart) { v2 = this.fstart; } if (v2 > this.fend) { v2 = this.fend; } if (this.State == 'play') { this.mc.gotoAndPlay(v2); } else { this.mc.gotoAndStop(v2); } }; v2.GetState = function () { return this.State; }; v2.GetDuration = function () { return this.duration; }; v2.GetVideoWidth = function () { return 1; }; v2.GetVideoHeight = function () { return 1; }; v2.GetX = function () { return 0; }; v2.GetY = function () { return 0; }; v2.SetXY = function (x, y) {}; v2.GetWidth = function () { return 1; }; v2.GetHeight = function () { return 1; }; v2.SetWidth = function (w) {}; v2.SetHeight = function (h) {}; v2.GetTime = function () { var v2 = this.mc._currentframe - this.fstart; if (v2 < 0) { v2 = 0; } if (v2 > this.fend - this.fstart + 1) { v2 = this.fend - this.fstart + 1; } return v2 / this.fps; }; v2.SetBufferTime = function (t) { this.mc._soundbuftime = t; }; v2.GetPercentage = function () { return this.mc.getBytesLoaded() * 100 / this.mc.getBytesTotal(); }; v2.onTimerPlay = function (obj) { obj.DispatchEvent('EFLVPB', 'onPlaying', undefined); }; v2.mc.onEnterFrame = function () { var v2 = this.externalObj; if (this._currentframe == v2.fstart) { v2.onPlayStart(); } else { if (this._currentframe >= v2.fend) { v2.onPlayEnd(); } } }; v2.onPlayStart = function () { if (!this.bOnPlayStartSent) { this.bOnPlayStartSent = true; this.DispatchEvent('EFLVPB', 'onPlayStart', undefined); } }; v2.onPlayEnd = function () { if (this.State == 'play') { this.DispatchEvent('EFLVPB', 'onPlayEnd', undefined); } }; return v2; } } frame 1 { function CreateFLVPlayback(path, scr) { var v2 = new Object(); FillOnListener(v2); v2.nc = new NetConnection(); v2.nc.connect(null); v2.ns = new NetStream(v2.nc); v2.ns.externalObj = v2; v2.videoScr = scr; v2.width = undefined; v2.height = undefined; v2.duration = undefined; v2.path = path; v2.State = 'stop'; v2.Open = function () { if (this.videoScr != undefined || this.videoScr != null) { this.videoScr.attachVideo(this.ns); } this.bPlayed = true; this.ns.play(this.path); this.ns.pause(true); }; v2.Close = function () { this.Stop(); this.ns.close(); this.videoScr.attachVideo(undefined); }; v2.SetDeblocking = function (nLevel) { if (this.videoScr != undefined) { this.videoScr.deblocking = nLevel; } }; v2.SetSmoothing = function (bSmooth) { if (this.videoScr != undefined) { this.videoScr.smoothing = bSmooth; } }; v2.Play = function () { this.ns.pause(false); if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); } this.State = 'play'; this.tmrPlay = setInterval(this.onTimerPlay, 100, this); }; v2.Pause = function () { this.ns.pause(true); if (this.tmrPlay != undefined) { clearInterval(this.tmrPlay); this.tmrPlay = undefined; } this.State = 'pause'; }; v2.Stop = function () { this.Pause(); this.State = 'stop'; }; v2.Seek = function (t) { this.ns.seek(t); }; v2.GetState = function () { return this.State; }; v2.GetDuration = function () { return this.duration; }; v2.GetVideoWidth = function () { return this.width; }; v2.SetWidth = function (w) { if (this.videoScr != undefined) { this.videoScr._width = w; } }; v2.GetWidth = function () { if (this.videoScr != undefined) { return this.videoScr._width; } }; v2.GetHeight = function () { if (this.videoScr != undefined) { return this.videoScr._height; } }; v2.GetVideoHeight = function () { return this.height; }; v2.SetHeight = function (h) { if (this.videoScr != undefined) { this.videoScr._height = h; } }; v2.GetX = function () { return this.videoScr._x; }; v2.GetY = function () { return this.videoScr._y; }; v2.SetXY = function (x, y) { this.videoScr._x = x; this.videoScr._y = y; }; v2.GetTime = function () { return this.ns.time; }; v2.SetBufferTime = function (t) { this.ns.setBufferTime(t); }; v2.GetPercentage = function () { if (this.ns.bytesTotal == 0) { return 0; } return this.ns.bytesLoaded * 100 / this.ns.bytesTotal; }; v2.onTimerPlay = function (obj) { obj.DispatchEvent('FLVPB', 'onPlaying', undefined); }; v2.ns.onMetaData = function (info) { this.externalObj.duration = info.duration; this.externalObj.width = info.width; this.externalObj.height = info.height; this.externalObj.DispatchEvent('FLVPB', 'onMetaData', info); }; v2.ns.onCuePoint = function (info) { this.externalObj.DispatchEvent('FLVPB', 'onCuePoint', info); }; v2.ns.onStatus = function (stat) { if (stat.code == 'NetStream.Buffer.Empty') { this.externalObj.DispatchEvent('FLVPB', 'onBufferEmpty', undefined); } else { if (stat.code == 'NetStream.Buffer.Full') { this.externalObj.DispatchEvent('FLVPB', 'onBufferFull', undefined); } else { if (stat.code == 'NetStream.Play.Start') { this.externalObj.DispatchEvent('FLVPB', 'onPlayStart', undefined); } else { if (stat.code == 'NetStream.Play.Stop') { this.externalObj.Pause(); this.externalObj.DispatchEvent('FLVPB', 'onPlayEnd', undefined); } else { if (stat.code == 'NetStream.Play.StreamNotFound') { this.externalObj.DispatchEvent('FLVPB', 'onError', undefined); } } } } } }; return v2; } } frame 1 { function ToText(v, n) { var v1 = '' + v; while (length(v1) < n) { v1 = '0' + v1; } return v1; } function ToMinSec(t) { t = int(t); return ToText(int(t / 60), 2) + ':' + ToText(t % 60, 2); } function CreateMoyeaPlayer(param) { var player = new Object(); this._lockroot = true; if (param.targetType == 'swf') { var v21; var v19; if (param.targetClip.length == undefined) { v21 = new Array(); v21[0] = param.targetClip; v19 = new Array(); v19[0] = param.targetFPS; player.playback = CreateSWFPlayback(v21, v19); } else { player.playback = CreateSWFPlayback(param.targetClip, param.targetFPS); } } else { if (param.targetType == 'flv') { player.playback = CreateFLVPlayback(param.targetClip, param.videoScr); } else { if (param.targetType == 'eflv') { player.playback = CreateEFLVPlayback(param.targetClip, param.targetFPS, param.frameStart, param.frameEnd); } else { trace('Not supported target type'); return undefined; } } } player.skin_mc = param.skin_mc; FillOnListener(player); if (param.bufferTime != undefined) { player.playback.SetBufferTime(param.bufferTime); } else { player.playback.SetBufferTime(5); } player.sndControler = new Sound(); if (param.sndVolume != undefined) { player.sndVolume = param.sndVolume; } else { player.sndVolume = 100; } player.onPlayPausePress = function () { var v2 = this.thisPlayer; var v3 = v2.playback.GetState(); if (!v2.bIsOpen) { v2.bIsOpen = true; v2.playClicked = true; v2.playback.Open(); } if (v3 == 'pause') { v2.playback.Play(); } else { if (v3 == 'stop') { if (v2.playback.GetTime() != 0) { v2.playback.Seek(0); } v2.playback.Play(); } else { v2.playback.Pause(); } } v2.UpdateUI(); v2.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); v2.DispatchEvent('MoyeaPlayer', 'onPlayPausePress', undefined); }; player.onReplayButonPress = function () { var v2 = this.thisPlayer; v2.playback.Seek(0); v2.playback.Play(); v2.UpdateUI(); v2.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); v2.DispatchEvent('MoyeaPlayer', 'onReplayPress', undefined); }; player.onStopPress = function () { var v2 = this.thisPlayer; v2.playback.Stop(); if (v2.playback.GetTime() != 0) { v2.playback.Seek(0); } v2.UpdateUI(); if (v2.param.unloadOnStop) { v2.playback.Close(); v2.bIsOpen = false; } v2.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); v2.DispatchEvent('MoyeaPlayer', 'onStopPress', undefined); }; player.onDragStart = function () { var v2 = this.thisPlayer; v2.bDragging = true; if (v2.playback.GetState() != 'pause') { v2.bNeedResume = true; } else { v2.bNeedResume = false; } v2.playback.Pause(); v2.DispatchEvent('MoyeaPlayer', 'onProcBarDragStart', undefined); }; player.onDrag = function () { var v2 = this.thisPlayer; v2.playback.Seek(v2.processBar.Position / 1000); if (v2.bDragging) { v2.playback.Pause(); } v2.DispatchEvent('MoyeaPlayer', 'onProcBarDragging', undefined); }; player.onDragEnd = function () { var v2 = this.thisPlayer; v2.bDragging = false; v2.playback.Seek(v2.processBar.Position / 1000); if (v2.bNeedResume) { v2.playback.Play(); } v2.UpdateUI(); v2.DispatchEvent('MoyeaPlayer', 'onProcBarDragEnd', undefined); }; player.onMutePress = function () { var v2 = this.thisPlayer; v2.SetMute(!v2.GetMute()); v2.DispatchEvent('MoyeaPlayer', 'onMuteSwitch', undefined); }; player.onVolumeDrag = function () { var v2 = this.thisPlayer; v2.sndVolume = v2.volumeBar.Position; if (!v2.sndMute) { v2.sndControler.setVolume(v2.sndVolume); } }; player.onLinkButonPress = function () { getURL(this.linkURL, this.linkTarget); }; player.UpdateUI = function () { var v2 = this.playback.GetState(); if (v2 == 'play') { this.btnPlayPause.SetState('on'); this.btnStop.SetEnabled(true); if (this.bSeekAble) { this.processBar.SetEnabled(true); this.processBar.SetPos(this.playback.GetTime() * 1000); } else { this.processBar.SetPos(0); } } else { if (v2 == 'pause') { this.btnPlayPause.SetState('off'); this.btnStop.SetEnabled(true); if (this.bSeekAble) { this.processBar.SetEnabled(true); this.processBar.SetPos(this.playback.GetTime() * 1000); } else { this.processBar.SetPos(0); } } else { if (v2 == 'stop') { this.btnStop.SetEnabled(false); this.btnPlayPause.SetState('off'); this.processBar.SetEnabled(false); this.processBar.SetPos(0); } } } if (this.sndMute) { this.btnMute.SetState('off'); } else { this.btnMute.SetState('on'); } if (v2 != 'stop') { this.grayPanel.SetVisible(false); this.btnReplay.SetVisible(false); } this.textTime.panel_mc.text.text = ToMinSec(this.playback.GetTime()) + ' / ' + ToMinSec(this.playback.GetDuration()); }; player.onEvent = function (sender, t, n, data) { if (n == 'onPlayStart') { if (this.param.onPlayURL != undefined && this.onPlayURLVarsMC == undefined) { this.onPlayURLVarsMC = _root.createEmptyMovieClip('', _root.getNextHighestDepth()); var v4 = this.param.onPlayURL; if (v4.indexOf('?', 0) != -1) { v4 += '&movieID=' + this.param.movieID; } else { v4 += '?movieID=' + this.param.movieID; } loadVariables(v4, this.onPlayURLVarsMC); } if (!this.playClicked && this.param.pauseAtFirstFrame) { this.playClicked = false; this.playback.Stop(); } else { this.playClicked = false; this.playback.Play(); } this.UpdateUI(); this.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); this.DispatchEvent('MoyeaPlayer', n, data); } else { if (n == 'onMetaData') { if (sender.GetDuration() != undefined) { this.processBar.SetMaxMin(0, sender.GetDuration() * 1000); this.bSeekAble = true; } this.AdjustControls(); this.UpdateUI(); this.DispatchEvent('MoyeaPlayer', n, data); } else { if (n == 'onPlaying') { if (this.bDragging) { return undefined; } this.UpdateUI(); this.DispatchEvent('MoyeaPlayer', n, data); } else { if (n == 'onPlayEnd') { if (this.bDragging) { return undefined; } if (this.param.urlOnEnd != undefined && this.param.urlOnEnd != '') { if (this.param.urlOnEndBrowser == 'swf') { _root.loadMovie(this.param.urlOnEnd); } else { if (this.param.urlOnEndBrowser == 'flv') { this.param.targetType = 'flv'; this.playback.Stop(); this.playback.path = this.param.urlOnEnd; this.playback.Open(); this.playback.Seek(0); this.playback.Play(); } else { getURL(this.param.urlOnEnd, this.param.urlOnEndTarget); } } } if (this.param.autoRewind) { this.playback.Seek(0); this.Play(); return undefined; } if (!this.param.pauseAtLastFrame) { this.playback.Seek(0); } this.playback.Stop(); this.UpdateUI(); if (this.param.showReplay) { this.grayPanel.SetVisible(true); this.btnReplay.SetVisible(true); } this.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); } else { if (n == 'onBufferEmpty') { if (player.GetState() != 'stop') { this.processBar.ShowRight(true); } this.DispatchEvent('MoyeaPlayer', n, data); } else { if (n == 'onBufferFull') { this.processBar.ShowRight(false); this.DispatchEvent('MoyeaPlayer', n, data); } else { if (n == 'onCuePoint') { this.DispatchEvent('MoyeaPlayer', n, data); } } } } } } } }; player.onMouseMove = function () { if (!this.playerPanel.visible) { if (this.ForceVisible == undefined || this.ForceVisible) { this.playerPanel.SetVisible(true); if (this.param.autoHideMouse) { Mouse.show(); } this.AdjustControls(); } } clearInterval(this.timerHidePlayer); this.timerHidePlayer = undefined; this.timerHidePlayer = setInterval(this.onTimerHidePlayer, this.hideDelay, this); }; player.CheckIfMouseInPlayer = function () { if (this.ForceMouseOut) { this.ForceMouseOut = false; return false; } if (this.param.playerAlign == 'top') { if (this.skin_mc._xmouse < this.playerPanel.rx + 10 || this.skin_mc._xmouse > this.playerPanel.rx + this.playerPanel.width - 10 || this.skin_mc._ymouse < this.playerPanel.ry + 10 || this.skin_mc._ymouse > this.playerPanel.ry + this.playerPanel.height) { return false; } return true; } if (this.skin_mc._xmouse < this.playerPanel.rx + 10 || this.skin_mc._xmouse > this.playerPanel.rx + this.playerPanel.width - 10 || this.skin_mc._ymouse < this.playerPanel.ry || this.skin_mc._ymouse > this.playerPanel.ry + this.playerPanel.height - 10) { return false; } return true; }; player.onTimerHidePlayer = function (o) { if (!o.CheckIfMouseInPlayer()) { if (o.param.autoHideMouse) { Mouse.hide(); } o.playerPanel.SetVisible(false); o.AdjustControls(); clearInterval(o.timerHidePlayer); o.timerHidePlayer = undefined; } }; player.onLoadPercentChanged = function (o) { o.processBar.SetLoadPercent(o.playback.GetPercentage() / 100); }; player.tmrLoadPercent = setInterval(player.onLoadPercentChanged, 100, player); player.Destroy = function () { clearInterval(this.timerHidePlayer); clearInterval(player.tmrLoadPercent); Stage.removeListener(this); Mouse.removeListener(this); this.root_ctrl.Destroy(); this.playback.Close(); this.skin_mc.removeMovieClip(); }; var root_ctrl = CreateBaseCtrl(undefined, this); root_ctrl.width = param.totalWidth; root_ctrl.height = param.totalHeight; player.root_ctrl = root_ctrl; var v22 = false; if (param.targetType == 'eflv') { param.scaleMode = undefined; } if (param.scaleMode == 'no' || param.scaleMode == 'stage') { if (param.scaleMode == 'stage') { Stage.align = 'TL'; } Stage.scaleMode = 'noScale'; Stage.addListener(player); if (param.scaleMode == 'no') { root_ctrl.SetPosition(0, 0, param.totalWidth, param.totalHeight); } else { param.totalWidth = Stage.width; param.totalHeight = Stage.height; root_ctrl.SetPosition(0, 0, Stage.width, Stage.height); } v22 = true; } else { root_ctrl.SetPosition(0, 0, param.totalWidth, param.totalHeight); } player.playerOverMovie = param.playerOverMovie; player.scaleMode = param.scaleMode; player.videoScr = param.videoScr; player.playerHeight = param.playerHeight; player.totalWidth = param.totalWidth; player.totalHeight = param.totalHeight; player.hideDelay = param.hideDelay; if (player.hideDelay == undefined) { player.hideDelay = 1000; } player.param = param; player.videoRect = new Object(); player.screenRect = new Object(); player.videoLoaded = false; player.AdjustControls = function () { this.screenRect.x = 0; this.screenRect.y = 0; this.screenRect.w = this.totalWidth; this.screenRect.h = this.totalHeight; var v9; var v8; var v3; var v2; var v7; var v6; var v4; var v5; if (this.param.playerOverMovie || !this.playerPanel.visible) { v4 = this.totalWidth; v5 = this.totalHeight; } else { v4 = this.totalWidth; v5 = this.totalHeight - this.playerHeight; } if (this.param.playerAlign == 'top') { v7 = 0; if (this.param.playerOverMovie || !this.playerPanel.visible) { v6 = 0; } else { v6 = this.playerHeight; } } else { v7 = 0; v6 = 0; } v9 = v7; v8 = v6; if (this.param.keepAspect) { v3 = this.playback.GetVideoWidth(); v2 = this.playback.GetVideoHeight(); if (v3 != undefined && v2 != undefined) { if (v3 * v5 > v2 * v4) { v2 = v2 * v4 / v3; v3 = v4; } else { v3 = v3 * v5 / v2; v2 = v5; } v9 = v7 + (v4 - v3) / 2; v8 = v6 + (v5 - v2) / 2; } else { v3 = v4; v2 = v5; } } else { v3 = v4; v2 = v5; } this.playback.SetXY(v9, v8); this.playback.SetWidth(v3); this.playback.SetHeight(v2); this.videoRect.x = v9; this.videoRect.y = v8; this.videoRect.w = v3; this.videoRect.h = v2; this.DispatchEvent('MoyeaPlayer', 'onResize', this.videoRect); }; player.onResize = function () { if (this.scaleMode == 'stage' || this.scaleMode == 'no') { if (this.scaleMode == 'stage') { this.totalWidth = Stage.width; this.totalHeight = Stage.height; } if (this.param.minWidth != undefined) { if (this.param.minWidth > this.totalWidth) { this.totalWidth = this.param.minWidth; } } if (this.param.minHeight != undefined) { if (this.param.minHeight > this.totalHeight) { this.totalHeight = this.param.minHeight; } } this.root_ctrl.SetPosition(0, 0, this.totalWidth, this.totalHeight); this.screenRect.w = this.totalWidth; this.screenRect.h = this.totalHeight; this.AdjustControls(); } }; player.Play = function () { if (!this.bIsOpen) { this.playClicked = true; this.bIsOpen = true; this.playback.Open(); } if (this.playback.GetState() == 'stop') { if (this.playback.GetTime() != 0) { this.playback.Seek(0); } } this.playback.Play(); this.UpdateUI(); this.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); }; player.Seek = function (t) { if (!this.bIsOpen) { this.bIsOpen = true; this.playback.Open(); } this.playback.Seek(t); this.UpdateUI(); }; player.Pause = function () { if (!this.bIsOpen) { this.bIsOpen = true; this.playback.Open(); } this.playback.Pause(); this.UpdateUI(); this.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); }; player.Stop = function () { if (!this.bIsOpen) { this.bIsOpen = true; this.playback.Open(); } if (this.playback.GetTime() != 0) { this.playback.Seek(0); } this.playback.Stop(); this.UpdateUI(); if (this.param.unloadOnStop) { this.playback.Close(); this.bIsOpen = false; } this.DispatchEvent('MoyeaPlayer', 'onStateChanged', undefined); }; player.SetMute = function (b) { this.sndMute = b; if (b) { this.sndControler.setVolume(0); } else { this.sndControler.setVolume(this.sndVolume); } this.UpdateUI(); }; player.sndMute = false; player.GetMute = function () { return this.sndMute; }; player.SetVolume = function (v) { this.sndVolume = v; if (!this.sndMute) { this.sndControler.setVolume(this.sndVolume); } this.volumeBar.SetPos(this.sndVolume); }; player.GetVolume = function () { return this.sndVolume; }; player.GetState = function () { return this.playback.GetState(); }; player.GetTime = function () { return this.playback.GetTime(); }; player.GetDuration = function () { return this.playback.GetDuration(); }; player.SetDebloking = function (l) { this.playback.SetDeblocking(l); }; player.SetSmoothing = function (b) { this.playback.SetSmoothing(b); }; player.SetVisible = function (b) { this.ForceVisible = b; this.playerPanel.SetVisible(b); this.AdjustControls(); }; player.GetVisible = function () { return this.playerPanel.visible; }; player.SetEnabled = function (b) { this.playerPanel.SetEnabled(b); }; player.GetEnabled = function () { return this.playerPanel.enabled; }; player.SetColor = function (c) { var v2; if (c == undefined) { v2 = 0; while (v2 < this.colorPanels.length) { this.colorPanels[v2].SetVisible(false); ++v2; } } else { var v3; v2 = 0; while (v2 < this.colorPanels.length) { v3 = new Color(this.colorPanels[v2].panel_mc); v3.setRGB(c); this.colorPanels[v2].SetVisible(true); ++v2; } } }; player.SetDepth = function (d) { this.skin_mc.swapDepths(d); }; player.colorPanels = new Array(); player.AddColorPanel = function (p) { this.colorPanels[this.colorPanels.length] = p; }; var v7 = new Object(); v7.root_ctrl = root_ctrl; var v6 = 0; var v3; var v5; var v4; v6 = 0; while (v6 < param.elements.length) { v3 = param.elements[v6]; if (v3.parent == undefined) { v5 = root_ctrl; } else { v5 = v7[v3.parent]; } if (v3.ctrlType == 'playbtn') { v4 = CreateDualButton(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.onPress = player.onPlayPausePress; player.btnPlayPause = v4; v4.SetState('off'); } else { if (v3.ctrlType == 'stopbtn') { v4 = CreateButton(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.onPress = player.onStopPress; player.btnStop = v4; } else { if (v3.ctrlType == 'mutebtn') { v4 = CreateDualButton(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.onPress = player.onMutePress; player.btnMute = v4; } else { if (v3.ctrlType == 'procbar') { v4 = CreateSpin(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.onDrag = player.onDrag; v4.onDragEnd = player.onDragEnd; v4.onDragStart = player.onDragStart; player.processBar = v4; } else { if (v3.ctrlType == 'volbar') { v4 = CreateSpin(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.onDrag = player.onVolumeDrag; v4.onDragEnd = player.onVolumeDrag; player.volumeBar = v4; } else { if (v3.ctrlType == 'player_panel') { v4 = CreatePanel(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); player.playerPanel = v4; } else { if (v3.ctrlType == 'panel') { v4 = CreatePanel(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); } else { if (v3.ctrlType == 'color_panel') { v4 = CreatePanel(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); player.AddColorPanel(v4); } else { if (v3.ctrlType == 'link') { v4 = CreateButton(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.linkURL = v3.linkURL; v4.linkTarget = v3.linkTarget; v4.onPress = player.onLinkButonPress; } else { if (v3.ctrlType == 'gray_panel') { v4 = CreatePanel(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.SetVisible(false); player.grayPanel = v4; } else { if (v3.ctrlType == 'video_link') { v4 = CreatePanel(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.SetVisible(false); v4.linkURL = param.videoLink; v4.linkTarget = param.videoLinkTarget; v4.SetOnPress(player.onLinkButonPress); player.videoLinkPanel = v4; } else { if (v3.ctrlType == 'replay_panel') { v4 = CreatePanel(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); v4.SetVisible(false); v4.SetOnPress(player.onReplayButonPress); player.btnReplay = v4; if (param.textReplay == undefined) { v4.panel_mc.text.text = 'Replay'; } else { v4.panel_mc.text.text = param.textReplay; } } else { if (v3.ctrlType == 'time_panel') { v4 = CreatePanel(v5, player.skin_mc[v3.ctrlName], v3.ctrlName); player.textTime = v4; } else { goto 14045; } } } } } } } } } } } } } v4.thisPlayer = player; v7[v3.ctrlName] = v4; v4.SetAchor(v3.xachor, v3.yachor); v4.SetPosition(v3.x, v3.y, v3.width, v3.height); v4.SetBand(v3.leftBand, v3.rightBand, v3.topBand, v3.bottomBand); label 14045: ++v6; } if (param.deblocking) { player.playback.SetDeblocking(2); } else { player.playback.SetDeblocking(0); } if (param.deblocking == undefined) { player.playback.SetDeblocking(2); } if (param.smoothing) { player.playback.SetSmoothing(true); } else { player.playback.SetSmoothing(false); } if (param.smoothing == undefined) { player.playback.SetSmoothing(true); } player.AdjustControls(); if (v22) { player.onResize(); } if (param.playerAutoHide) { Mouse.addListener(player); player.ForceMouseOut = true; player.onMouseMove(); } player.grayPanel.SetBand(0, 0, 0, 0); if (player.param.playerAlign == 'top') { player.playerPanel.SetAchor(0, 0); player.playerPanel.SetPosition(0, 0, 10, player.playerHeight); player.videoLinkPanel.SetBand(0, 0, player.playerHeight, 0); } else { player.playerPanel.SetAchor(0, 1); player.playerPanel.SetPosition(0, -player.playerHeight, 10, player.playerHeight); player.videoLinkPanel.SetBand(0, 0, 0, player.playerHeight); } player.playerPanel.SetBand(0, undefined, undefined, undefined); player.SetColor(param.panelColor); if (player.param.targetType == 'flv') { player.processBar.SetEnabled(false); } else { if (player.param.targetType == 'swf' || player.param.targetType == 'eflv') { player.processBar.SetEnabled(false); player.bSeekAble = true; } } player.volumeBar.SetMaxMin(0, 100); player.volumeBar.SetPos(player.sndVolume); player.sndMute = param.sndMute; if (player.sndMute) { player.btnMute.SetState('off'); player.sndControler.setVolume(0); } else { player.btnMute.SetState('on'); player.sndControler.setVolume(player.sndVolume); } player.playback.AddListener(player); if (param.videoLink != undefined) { player.videoLinkPanel.SetVisible(true); } player.processBar.SetMaxMin(0, player.playback.GetDuration() * 1000); if (player.param.pauseAtFirstFrame == undefined) { player.param.pauseAtFirstFrame = true; } param.skin_mc._visible = false; player.skin_mc._visible = true; if (param.autoLoad) { player.bIsOpen = true; player.playback.Open(); } if (param.targetType == 'flv') { player.playback.Seek(0); } if (param.fscEvent) { var v20 = new Object(); v20.onEvent = function (sender, t, n, data) { fscommand('' add t, n); }; player.AddListener(v20); } if (param.showPlayer != undefined && !param.showPlayer) { player.SetVisible(false); } return player; } } frame 1 { function CreateParamObject(opts) { var param = new Object(); var s = opts; var ss = s.split('||', 100); var opt; var i; i = 0; while (i < ss.length) { opt = ss[i].split('*', 3); if (opt.length != 3) { } else { if (opt[2] == 'i') { param[opt[0]] = int(opt[1]); } else { if (opt[2] == 's') { param[opt[0]] = '' + opt[1]; } else { if (opt[2] == 'e') { param[opt[0]] = eval(opt[1]); } else { if (opt[2] == 'b') { param[opt[0]] = opt[1] == 'true'; } else { if (opt[2] == 'f') { param[opt[0]] = Number(opt[1]); } else { if (opt[2] == 'c') { var rgb = opt[1].split(',', 3); if (rgb.length != 3) { } else { var r = int(rgb[0]); var g = int(rgb[1]); var b = int(rgb[2]); param[opt[0]] = r << 16 | g << 8 | b; } } } } } } } } ++i; } return param; } function FillDefaultParam(o) { if (o.targetType == undefined) { o.targetType = 'flv'; } if (o.skin_mc == undefined) { o.skin_mc = skin_mc; } if (o.totalWidth == undefined) { o.totalWidth = Stage.width; } if (o.totalHeight == undefined) { o.totalHeight = Stage.height; } if (o.videoScr == undefined) { o.videoScr = myScr; } if (o.scaleMode == undefined) { o.scaleMode = 'stage'; } } } frame 1 { var paramObj = CreateParamObject(playerOpts); skin_mc._x = 0; skin_mc._y = 0; skin_mc._visible = false; paramObj.playerHeight = 34; var ctrls = new Array(); var hUsage = 0; var hUsage2 = 0; ctrls[0] = {'ctrlType': 'player_panel', 'ctrlName': 'panel_mc', 'xachor': 0, 'yachor': 1, 'x': 0, 'y': -34, 'width': 0, 'height': 34, 'leftBand': 0}; if (paramObj.noPlayPauseBtn) { ctrls[1] = undefined; skin_mc.play_mc._visible = false; hUsage = 12; } else { hUsage = 20; ctrls[1] = {'ctrlType': 'playbtn', 'ctrlName': 'play_mc', 'xachor': 0, 'yachor': 0, 'x': hUsage, 'y': 16, 'width': 20, 'height': 20, 'parent': 'panel_mc'}; } if (paramObj.noStopBtn) { ctrls[2] = undefined; skin_mc.stop_mc._visible = false; } else { hUsage += 32; ctrls[2] = {'ctrlType': 'stopbtn', 'ctrlName': 'stop_mc', 'xachor': 0, 'yachor': 0, 'x': hUsage, 'y': 16, 'width': 20, 'height': 20, 'parent': 'panel_mc'}; } if (paramObj.noVolumeBar) { ctrls[5] = undefined; hUsage2 = -13; skin_mc.volume_mc._visible = false; } else { hUsage2 = -63; ctrls[5] = {'ctrlType': 'volbar', 'ctrlName': 'volume_mc', 'xachor': 1, 'yachor': 0, 'x': hUsage2, 'y': 10, 'width': 50, 'height': 15, 'parent': 'panel_mc'}; } if (paramObj.noMuteBtn) { ctrls[4] = undefined; skin_mc.mute_mc._visible = false; } else { hUsage2 -= 18; ctrls[4] = {'ctrlType': 'mutebtn', 'ctrlName': 'mute_mc', 'xachor': 1, 'yachor': 0, 'x': hUsage2, 'y': 10, 'width': 20, 'height': 20, 'parent': 'panel_mc'}; } if (paramObj.noProcBar) { ctrls[3] = undefined; skin_mc.proc_mc._visible = false; } else { hUsage += 30; ctrls[3] = {'ctrlType': 'procbar', 'ctrlName': 'proc_mc', 'xachor': 0, 'yachor': 0, 'x': 0, 'y': 16, 'width': 400, 'height': 2, 'leftBand': hUsage, 'rightBand': 10 - hUsage2, 'parent': 'panel_mc'}; } ctrls[6] = {'ctrlType': 'panel', 'ctrlName': 'panel_mc_left', 'xachor': 0, 'yachor': 0, 'x': 0, 'y': 0, 'width': 15, 'height': 34, 'parent': 'panel_mc'}; ctrls[7] = {'ctrlType': 'panel', 'ctrlName': 'panel_mc_right', 'xachor': 1, 'yachor': 0, 'x': -15, 'y': 0, 'width': 15, 'height': 34, 'parent': 'panel_mc'}; ctrls[8] = {'ctrlType': 'panel', 'ctrlName': 'panel_mc_mid', 'xachor': 0, 'yachor': 0, 'x': 0, 'y': 0, 'width': 0, 'height': 34, 'leftBand': 15, 'rightBand': 15, 'parent': 'panel_mc'}; ctrls[9] = {'ctrlType': 'color_panel', 'ctrlName': 'color_panel_mc_right', 'xachor': 1, 'yachor': 0, 'x': -15, 'y': 0, 'width': 15, 'height': 34, 'parent': 'panel_mc'}; ctrls[10] = {'ctrlType': 'color_panel', 'ctrlName': 'color_panel_mc_left', 'xachor': 0, 'yachor': 0, 'x': 0, 'y': 0, 'width': 15, 'height': 34, 'parent': 'panel_mc'}; ctrls[11] = {'ctrlType': 'color_panel', 'ctrlName': 'color_panel_mc_mid', 'xachor': 0, 'yachor': 0, 'x': 0, 'y': 0, 'width': 0, 'height': 34, 'leftBand': 15, 'rightBand': 15, 'parent': 'panel_mc'}; ctrls[12] = {'ctrlType': 'gray_panel', 'ctrlName': 'gray_panel', 'xachor': 1, 'yachor': 0, 'x': -15, 'y': 0, 'width': 15, 'height': 34, 'parent': 'root_ctrl'}; ctrls[13] = {'ctrlType': 'replay_panel', 'ctrlName': 'replay_panel', 'xachor': 2, 'yachor': 2, 'x': -45, 'y': -15, 'width': 90, 'height': 30, 'parent': 'root_ctrl'}; ctrls[14] = {'ctrlType': 'video_link', 'ctrlName': 'videolink', 'xachor': 0, 'yachor': 0, 'x': 0, 'y': 0, 'width': 0, 'height': 0, 'parent': 'root_ctrl'}; if (!paramObj.noTimeText) { ctrls[15] = {'ctrlType': 'time_panel', 'ctrlName': 'time_panel', 'xachor': 1, 'yachor': 0, 'x': -75 + hUsage2, 'y': 0, 'width': 65, 'height': 15, 'parent': 'panel_mc'}; } paramObj.elements = ctrls; FillDefaultParam(paramObj); if (thePlayer != undefined) { thePlayer.Destroy(); thePlayer = undefined; } thePlayer = CreateMoyeaPlayer(paramObj); var eventCatcher = new Object(); this.createTextField('SubBox', this.getNextHighestDepth(), 0, thePlayer.totalHeight - thePlayer.playerHeight - 40, thePlayer.totalWidth, 40); SubBox.selectable = false; SubBox.textColor = 16711680; eventCatcher.SubBox = SubBox; if (paramObj.subHeight != undefined) { SubBox._height = paramObj.subHeight; } else { SubBox._height = 40; } var fmt = new TextFormat(); fmt.align = 'center'; if (paramObj.subBold != undefined) { fmt.bold = paramObj.subBold; } else { fmt.bold = true; } if (paramObj.subSize != undefined) { fmt.size = paramObj.subSize; } else { fmt.size = 20; } fmt.font = paramObj.subFont; if (paramObj.subColor != undefined) { fmt.color = paramObj.subColor; } else { fmt.color = 16711680; } SubBox.setNewTextFormat(fmt); SubBox._visible = false; eventCatcher.hideSubBox = function (p) { clearInterval(p.hideSubBoxTimer); p.hideSubBoxTimer = undefined; p.SubBox._visible = false; }; var thumbNailInit = false; eventCatcher.onEvent = function (sender, t, n, info) { if (n == 'onResize') { if (thumbNailInit) { thumbnail_layer._x = info.x; thumbnail_layer._y = info.y; thumbnail_layer._width = info.w; thumbnail_layer._height = info.h; } this.SubBox._x = 0; this.SubBox._y = info.y + info.h - this.SubBox._height; this.SubBox._width = sender.totalWidth; } else { if (n == 'onCuePoint') { if (info.name == 'my::title') { this.SubBox.text = info.parameters.t; this.SubBox._visible = true; clearInterval(this.hideSubBoxTimer); this.hideSubBoxTimer = setInterval(this.hideSubBox, Number(info.parameters.d), this); } } } if (sender.GetState() == 'stop') { thumbnail_layer._visible = true; } else { thumbnail_layer._visible = false; } }; thePlayer.AddListener(eventCatcher); if (thePlayer.param.thumbNail != undefined && thePlayer.param.thumbNail != '') { var loader = new MovieClipLoader(); var loader_cb = new Object(); loader_cb.player = thePlayer; loader_cb.onLoadInit = function (mc) { thumbNailInit = true; this.player.AdjustControls(); }; loader.addListener(loader_cb); loader.loadClip(thePlayer.param.thumbNail, thumbnail_layer); } else { thumbNailInit = true; } if (thePlayer.param.preLoader != undefined) { preloader_layer.loadMovie(thePlayer.param.preLoader); } if (thePlayer.param.bigPlay != undefined) { bigplay_layer.loadMovie(thePlayer.param.bigPlay); } if (thePlayer.param.playerExt != undefined) { extswf_layer.loadMovie(thePlayer.param.playerExt); } } movieClip 21 { } movieClip 22 { } movieClip 25 { } movieClip 26 { } movieClip 28 { } movieClip 29 { } movieClip 31 { } movieClip 32 { } movieClip 34 { } movieClip 35 { } movieClip 37 { } movieClip 38 { } movieClip 40 { } movieClip 41 { } movieClip 44 { } movieClip 45 { } movieClip 47 { } movieClip 48 { } movieClip 49 { } movieClip 50 { } movieClip 52 { } movieClip 54 { } movieClip 56 { } movieClip 60 { } movieClip 61 { } movieClip 63 { } movieClip 67 { } movieClip 68 { } movieClip 75 { } movieClip 76 { } movieClip 81 { } movieClip 86 { } movieClip 87 { } movieClip 90 { } movieClip 91 { } movieClip 96 { } movieClip 100 { } movieClip 101 { } movieClip 102 { } movieClip 115 { } movieClip 104 { } movieClip 121 { } movieClip 117 { }




http://swfchan.com/14/66777/info.shtml
Created: 11/4 -2019 20:48:33 Last modified: 11/4 -2019 20:48:33 Server time: 23/12 -2024 02:04:51