Frame 2 (2.57 KiB) ●
function _showHelp() {
_root.guiHelp._visible = true;
}
function _switchGUI() {
_root.guiControl._visible = !_root.guiControl._visible;
}
function _enumSlideSizeList() {
slideWidth = new Array(_root.slide._totalframes + 1);
slideHeight = new Array(_root.slide._totalframes + 1);
_root.slide.gotoAndStop(1);
slideWidth[0] = (slideHeight[0] = 0);
i = 1;
for ( ; _root.slide._totalframes >= i ; i++) {
slideWidth[i] = _root.slide._width;
slideHeight[i] = _root.slide._height;
_root.slide.nextFrame();
}
_root.slide.gotoAndStop(1);
}
var slideWidth = eval("undefined");
var slideHeight = eval("undefined");
var isFullScale = 0;
var _GUI_SCALE = 150;
var _MENU_ITEM_NAME_1 = "How to use...";
var _MENU_ITEM_NAME_2 = "Show / Hide Controls...";
var _APP_NAME = "SlideShow Flash";
var _APP_AUTHOR = "Developed by aonan.";
var _APP_COPYRIGHT = "Copyright(C)2012 aonan all rights reserved.";
var _APP_MAJOR_VER = 2;
var _APP_MINOR_VER = 5;
var _APP_REVISION_VER = 0;
var _APP_VERSION = ((_APP_MAJOR_VER + ".") + _APP_MINOR_VER);
var menu_cm = new ContextMenu();
menu_cm.builtInItems.forward_back = false;
menu_cm.builtInItems.loop = false;
menu_cm.builtInItems.play = false;
menu_cm.builtInItems.print = true;
menu_cm.builtInItems.quality = true;
menu_cm.builtInItems.rewind = false;
menu_cm.builtInItems.zoom = false;
var menu_item_1 = new ContextMenuItem();
menu_item_1.caption = _MENU_ITEM_NAME_1;
menu_item_1.enabled = true;
menu_item_1.separatorBefore = false;
menu_item_1.visible = true;
menu_item_1.onSelect = function () {
_showHelp();
};
var menu_item_2 = new ContextMenuItem();
menu_item_2.caption = _MENU_ITEM_NAME_2;
menu_item_2.enabled = true;
menu_item_2.separatorBefore = false;
menu_item_2.visible = true;
menu_item_2.onSelect = function () {
_switchGUI();
};
var menu_item_3 = new ContextMenuItem();
menu_item_3.caption = (_APP_NAME + " ") + _APP_VERSION;
menu_item_3.enabled = false;
menu_item_3.separatorBefore = true;
menu_item_3.visible = true;
menu_item_3.onSelect = function () {
};
var menu_item_4 = new ContextMenuItem();
menu_item_4.caption = _APP_AUTHOR;
menu_item_4.enabled = false;
menu_item_4.separatorBefore = false;
menu_item_4.visible = true;
menu_item_4.onSelect = function () {
};
var menu_item_5 = new ContextMenuItem();
menu_item_5.caption = _APP_COPYRIGHT;
menu_item_5.enabled = false;
menu_item_5.separatorBefore = false;
menu_item_5.visible = true;
menu_item_5.onSelect = function () {
};
menu_cm.customItems = [menu_item_1, menu_item_2, menu_item_3, menu_item_4, menu_item_5];
_root.menu = menu_cm;
Instance of Symbol 19954 MovieClip [guiHelp] "guiHelp" in Frame 3 (990 B)
onClipEvent (load) {
this._visible = false;
var _quotWidth = (Stage.width / (this._width * (parseInt(_root._GUI_SCALE) / 100)));
var _quotHeight = (Stage.height / (this._height * (parseInt(_root._GUI_SCALE) / 100)));
if (1 < _quotWidth) {
this._x = (Stage.width / 2) - ((this._width * (parseInt(_root._GUI_SCALE) / 100)) / 2);
this._xscale = parseInt(_root._GUI_SCALE);
}
if (1 < _quotHeight) {
this._y = (Stage.height / 2) - ((this._height * (parseInt(_root._GUI_SCALE) / 100)) / 2);
this._yscale = parseInt(_root._GUI_SCALE);
}
if (_quotWidth < 1) {
this._x = (Stage.width / 2) - (((this._width * (parseInt(_root._GUI_SCALE) / 100)) * _quotWidth) / 2);
this._xscale = parseInt(_root._GUI_SCALE) * _quotWidth;
}
if (_quotHeight < 1) {
this._y = (Stage.height / 2) - (((this._height * (parseInt(_root._GUI_SCALE) / 100)) * _quotHeight) / 2);
this._yscale = parseInt(_root._GUI_SCALE) * _quotHeight;
}
}
onClipEvent (mouseMove) {
updateAfterEvent();
}
Instance of Symbol 19956 MovieClip [guiControl] "guiControl" in Frame 3 (820 B)
onClipEvent (load) {
this._visible = false;
var _quotWidth = (Stage.width / (this._width * (parseInt(_root._GUI_SCALE) / 100)));
var _quotHeight = (Stage.height / (this._height * (parseInt(_root._GUI_SCALE) / 100)));
if (1 < _quotWidth) {
this._x = (Stage.width / 2) - ((this._width * (parseInt(_root._GUI_SCALE) / 100)) / 2);
this._xscale = parseInt(_root._GUI_SCALE);
}
if (1 < _quotHeight) {
this._y = 0;
this._yscale = parseInt(_root._GUI_SCALE);
}
if (_quotWidth < 1) {
this._x = (Stage.width / 2) - (((this._width * (parseInt(_root._GUI_SCALE) / 100)) * _quotWidth) / 2);
this._xscale = parseInt(_root._GUI_SCALE) * _quotWidth;
}
if (_quotHeight < 1) {
this._y = 0;
this._yscale = parseInt(_root._GUI_SCALE) * _quotHeight;
}
}
onClipEvent (mouseMove) {
updateAfterEvent();
}
Instance of Symbol 19958 MovieClip [slide] "slide" in Frame 3 (269 B)
onClipEvent (load) {
this._visible = false;
this.gotoAndStop(1);
}
on (press) {
this.startDrag(false, 0, 0, Stage.width - this._width, Stage.height - this._height);
}
on (release, releaseOutside) {
this.stopDrag();
}
onClipEvent (mouseMove) {
updateAfterEvent();
}
Instance of Symbol 19996 MovieClip [processor] "processor" in Frame 3 (281 B)
onClipEvent (load) {
_root._enumSlideSizeList();
_root.guiControl._calcImageScaleFact();
_root.guiControl._setImageScaleFact();
_root.guiControl._imgCentering();
_root.guiControl._Refresh();
_root.slide._visible = (_root.guiControl._visible = true);
this._visible = false;
}
Frame 3 (8 B)
stop();
Symbol 20000 Button (161 B)
on (press) {
this.startDrag(false, 0, 0, Stage.width - this._width, Stage.height - this._height);
}
on (release, releaseOutside) {
this.stopDrag();
}
on () {
}
Symbol 20001 Button (161 B)
on (press) {
this.startDrag(false, 0, 0, Stage.width - this._width, Stage.height - this._height);
}
on (release, releaseOutside) {
this.stopDrag();
}
on () {
}
Symbol 20002 Button (161 B)
on (press) {
this.startDrag(false, 0, 0, Stage.width - this._width, Stage.height - this._height);
}
on (release, releaseOutside) {
this.stopDrag();
}
on () {
}
Symbol 20003 Button (50 B)
on (release) {
this._visible = false;
}
on () {
}
Symbol 20004 Button (161 B)
on (press) {
this.startDrag(false, 0, 0, Stage.width - this._width, Stage.height - this._height);
}
on (release, releaseOutside) {
this.stopDrag();
}
on () {
}
Symbol 20005 Button (41 B)
on (release) {
this._Back();
}
on () {
}
Symbol 20006 Button (161 B)
on (press) {
this.startDrag(false, 0, 0, Stage.width - this._width, Stage.height - this._height);
}
on (release, releaseOutside) {
this.stopDrag();
}
on () {
}
Symbol 20007 Button (44 B)
on (release) {
this._Forward();
}
on () {
}
Instance of Symbol 19962 MovieClip [btnReduce] "btnReduce" in Symbol 19956 MovieClip [guiControl] Frame 1 (46 B)
onClipEvent (load) {
this._visible = false;
}
Symbol 19956 MovieClip [guiControl] Frame 1 (2.48 KiB) ●
function _Refresh() {
_calcPosition();
}
function _Back() {
_root.slide.prevFrame();
_calcPosition();
if (!_root.isFullScale) {
_recalcImageReduce();
} else {
_recalcImageExpand();
}
}
function _Forward() {
_root.slide.nextFrame();
_calcPosition();
if (!_root.isFullScale) {
_recalcImageReduce();
} else {
_recalcImageExpand();
}
}
function _imgExpand() {
_resetImageScaleFact();
_imgCentering();
_switchExpandReduceBtn();
}
function _imgReduce() {
_calcImageScaleFact();
_setImageScaleFact();
_imgCentering();
_switchExpandReduceBtn();
}
function _recalcImageExpand() {
_resetImageScaleFact();
_imgCentering();
}
function _recalcImageReduce() {
_resetImageScaleFact();
_calcImageScaleFact();
_setImageScaleFact();
_imgCentering();
}
function _calcPosition() {
this.lblPages = (parseInt(_root.slide._currentframe) + "/") + parseInt(_root.slide._totalframes);
}
function _resetImageScaleFact() {
_root.slide._width = _root.slideWidth[_root.slide._currentframe];
_root.slide._height = _root.slideHeight[_root.slide._currentframe];
}
function _calcImageScaleFact() {
_quotWidth = Stage.width / _root.slideWidth[_root.slide._currentframe];
_quotHeight = Stage.height / _root.slideHeight[_root.slide._currentframe];
}
function _setImageScaleFact() {
if ((_quotWidth < 1) || (_quotHeight < 1)) {
if (_quotHeight >= _quotWidth) {
if (_quotWidth >= _quotHeight) {
_root.slide._width = _quotWidth * _root.slideWidth[_root.slide._currentframe];
_root.slide._height = _quotHeight * _root.slideHeight[_root.slide._currentframe];
} else {
_root.slide._width = _root.slideWidth[_root.slide._currentframe];
if (_quotWidth < 1) {
_root.slide._width = Stage.width;
}
_root.slide._height = _quotWidth * _root.slideHeight[_root.slide._currentframe];
}
} else {
_root.slide._width = _quotHeight * _root.slideWidth[_root.slide._currentframe];
_root.slide._height = _root.slideHeight[_root.slide._currentframe];
if (_quotHeight < 1) {
_root.slide._height = Stage.height;
}
}
}
}
function _imgCentering() {
_root.slide._x = (Stage.width / 2) - (_root.slide._width / 2);
_root.slide._y = (Stage.height / 2) - (_root.slide._height / 2);
}
function _switchExpandReduceBtn() {
this.btnExpand._visible = this.btnReduce._visible;
this.btnReduce._visible = !this.btnExpand._visible;
_root.isFullScale = !_root.isFullScale;
}
var _quotWidth = 0;
var _quotHeight = 0;
Symbol 20008 Button (49 B)
on (release) {
_parent._imgExpand();
}
on () {
}
Symbol 20009 Button (49 B)
on (release) {
_parent._imgReduce();
}
on () {
}