⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 asflippage.as

📁 很方便实用的一个相册源码
💻 AS
📖 第 1 页 / 共 5 页
字号:
                        flip_win = true;
                        aim_x = pfx;
                        aim_y = pfy;
                        filp_sound_fun();
                        onEnterFrame = function () {
                            this.point_xy_arry[0].x = this.point_xy_arry[0].x + ((this.aim_x - this.point_xy_arry[0].x) / (1 + this.flip_speed));
                            this.point_xy_arry[0].y = this.point_xy_arry[0].y + ((this.aim_y - this.point_xy_arry[0].y) / (1 + this.flip_speed));
                            this.flip_ing_fun();
                            if (Math.sqrt(Math.pow(this.point_xy_arry[0].x - this.aim_x, 2) + Math.pow(this.point_xy_arry[0].y - this.aim_y, 2)) <= this.end_filp_distance_v) {
                                this.show_prev_page_fun();
                            }
                        };
                    } else {
                        flip_win = false;
                        aim_x = pbx;
                        aim_y = pby;
                        filp_sound_fun();
                        onEnterFrame = function () {
                            this.point_xy_arry[0].x = this.point_xy_arry[0].x + ((this.aim_x - this.point_xy_arry[0].x) / (1 + this.flip_speed));
                            this.point_xy_arry[0].y = this.point_xy_arry[0].y + ((this.aim_y - this.point_xy_arry[0].y) / (1 + this.flip_speed));
                            this.flip_ing_fun();
                            if (Math.sqrt(Math.pow(this.point_xy_arry[0].x - this.aim_x, 2) + Math.pow(this.point_xy_arry[0].y - this.aim_y, 2)) <= this.end_filp_distance_v) {
                                this.no_flip_page_fun();
                            }
                        };
                     }
                } else if (drag_area == 4) {
                    if ((point_xy_arry[3].x > pcx) or press_filp_fun()) {
                        flip_win = true;
                        aim_x = pex;
                        aim_y = pey;
                        filp_sound_fun();
                        onEnterFrame = function () {
                            this.tem_array[0].x = this.tem_array[0].x + ((this.aim_x - this.tem_array[0].x) / (1 + this.flip_speed));
                            this.tem_array[0].y = this.tem_array[0].y + ((this.aim_y - this.tem_array[0].y) / (1 + this.flip_speed));
                            this.flip_ing_fun();
                            if (Math.sqrt(Math.pow(this.point_xy_arry[3].x - this.aim_x, 2) + Math.pow(this.point_xy_arry[3].y - this.aim_y, 2)) <= this.end_filp_distance_v) {
                                this.show_prev_page_fun();
                            }
                        };
                    } else {
                        flip_win = false;
                        aim_x = pax;
                        aim_y = pay;
                        filp_sound_fun();
                        onEnterFrame = function () {
                            this.tem_array[0].x = this.tem_array[0].x + ((this.aim_x - this.tem_array[0].x) / (1 + this.flip_speed));
                            this.tem_array[0].y = this.tem_array[0].y + ((this.aim_y - this.tem_array[0].y) / (1 + this.flip_speed));
                            this.flip_ing_fun();
                            if (Math.sqrt(Math.pow(this.point_xy_arry[3].x - this.aim_x, 2) + Math.pow(this.point_xy_arry[3].y - this.aim_y, 2)) <= this.end_filp_distance_v) {
                                this.no_flip_page_fun();
                            }
                        };
                     }
                }
            }
        }
        function onMouseMove_filp_fun() {
            var _local2;
            var _local3;
            if (drag_area == 1) {
                if (_xmouse > pfx) {
                    _local2 = pfx - 0.01;
                    _local3 = pfy - 0.01;
                } else {
                    _local2 = _xmouse;
                    _local3 = _ymouse;
                 }
            } else if (drag_area == 3) {
                if (_xmouse > pfx) {
                    _local2 = pex - 0.01;
                    _local3 = pey + 0.01;
                } else {
                    _local2 = _xmouse;
                    _local3 = _ymouse;
                 }
            } else if (drag_area == 2) {
                if (_xmouse < pax) {
                    _local2 = pbx + 0.01;
                    _local3 = pby - 0.01;
                } else {
                    _local2 = _xmouse;
                    _local3 = _ymouse;
                 }
            } else if (drag_area == 4) {
                if (_xmouse < pax) {
                    _local2 = pax + 0.01;
                    _local3 = pay + 0.01;
                } else {
                    _local2 = _xmouse;
                    _local3 = _ymouse;
                 }
            }
            if ((drag_area == 1) or (drag_area == 2)) {
                point_xy_arry[0].x = point_xy_arry[0].x + ((_local2 - point_xy_arry[0].x) / BufferCoefficient);
                point_xy_arry[0].y = point_xy_arry[0].y + ((_local3 - point_xy_arry[0].y) / BufferCoefficient);
            } else if ((drag_area == 3) or (drag_area == 4)) {
                tem_array[0].x = tem_array[0].x + ((_local2 - tem_array[0].x) / BufferCoefficient);
                tem_array[0].y = tem_array[0].y + ((_local3 - tem_array[0].y) / BufferCoefficient);
            }
            flip_ing_fun();
        }
        function set_CueHitArea_fun() {
            var _local2;
            var _local3;
            if (!CueHitArea_ing) {
                if (if_out_page_area_fun()) {
                    if ((_xmouse > (pfx - hit_area_object.RightBottomWidth)) and (_ymouse > (pfy - hit_area_object.RightBottomHigh))) {
                        drag_area = 1;
                        _local2 = pfx;
                        _local3 = pfy;
                    } else if ((_xmouse < (pbx + hit_area_object.LiftBottomWidth)) and (_ymouse > (pby - hit_area_object.LiftBottomHigh))) {
                        drag_area = 2;
                        _local2 = pbx;
                        _local3 = pby;
                    } else if ((_xmouse > (pex - hit_area_object.RightTopWidth)) and (_ymouse < (pey + hit_area_object.RightTopHigh))) {
                        drag_area = 3;
                        _local2 = pex;
                        _local3 = pey;
                    } else if ((_xmouse < (pax + hit_area_object.LiftTopWidth)) and (_ymouse < (pay + hit_area_object.LiftTopHigh))) {
                        drag_area = 4;
                        _local2 = pax;
                        _local3 = pay;
                    } else {
                        drag_area = 0;
                     }
                    if ((((drag_area == 1) or (drag_area == 3)) and (on_page_v < all_page_v)) or (((drag_area == 2) or (drag_area == 4)) and (on_page_v > 1))) {
                        clearInterval(stop_time_si);
                        point_xy_arry[0].x = (tem_array[0].x = _local2);
                        point_xy_arry[0].y = (tem_array[0].y = _local3);
                        on_mc._visible = true;
                        this.attachMovie(book_mc, "flip_mc", 300);
                        this.attachMovie(book_mc, "next_mc", 200);
                        next_mc._x = pcx;
                        next_mc._y = pcy;
                        if ((drag_area == 1) or (drag_area == 3)) {
                            next_mc.gotoAndStop(on_page_v + 1);
                            flip_mc.gotoAndStop(on_page_v + 1);
                        } else if ((drag_area == 2) or (drag_area == 4)) {
                            next_mc.gotoAndStop(on_page_v - 1);
                            flip_mc.gotoAndStop(on_page_v - 1);
                        }
                        onMouseMove_filp_fun();
                        CueHitArea_ing = true;
                        OnStartCueHitAreaing();
                    }
                }
            } else {
                if (drag_area == 1) {
                    if (((_xmouse < (pfx - hit_area_object.RightBottomWidth)) or (_ymouse < (pfy - hit_area_object.RightBottomHigh))) or (!if_out_page_area_fun())) {
                        _local2 = pfx;
                        _local3 = pfy;
                        if (Math.sqrt(Math.pow(point_xy_arry[0].x - _local2, 2) + Math.pow(point_xy_arry[0].y - _local3, 2)) <= end_filp_distance_v) {
                            no_flip_page_fun();
                        }
                    } else {
                        _local2 = _xmouse;
                        _local3 = _ymouse;
                     }
                } else if (drag_area == 3) {
                    if (((_xmouse < (pex - hit_area_object.RightTopWidth)) or (_ymouse > (pey + hit_area_object.RightTopHigh))) or (!if_out_page_area_fun())) {
                        _local2 = pex;
                        _local3 = pey;
                        if (Math.sqrt(Math.pow(tem_array[0].x - _local2, 2) + Math.pow(tem_array[0].y - _local3, 2)) <= end_filp_distance_v) {
                            no_flip_page_fun();
                        }
                    } else {
                        _local2 = _xmouse;
                        _local3 = _ymouse;
                     }
                } else if (drag_area == 2) {
                    if (((_xmouse > (pbx + hit_area_object.LiftBottomWidth)) or (_ymouse < (pby - hit_area_object.LiftBottomHigh))) or (!if_out_page_area_fun())) {
                        _local2 = pbx;
                        _local3 = pby;
                        if (Math.sqrt(Math.pow(point_xy_arry[0].x - _local2, 2) + Math.pow(point_xy_arry[0].y - _local3, 2)) <= end_filp_distance_v) {
                            no_flip_page_fun();
                        }
                    } else {
                        _local2 = _xmouse;
                        _local3 = _ymouse;
                     }
                } else if (drag_area == 4) {
                    if (((_xmouse > (pax + hit_area_object.LiftTopWidth)) or (_ymouse > (pay + hit_area_object.LiftTopHigh))) or (!if_out_page_area_fun())) {
                        _local2 = pax;
                        _local3 = pay;
                        if (Math.sqrt(Math.pow(tem_array[0].x - _local2, 2) + Math.pow(tem_array[0].y - _local3, 2)) <= end_filp_distance_v) {
                            no_flip_page_fun();
                        }
                    } else {
                        _local2 = _xmouse;
                        _local3 = _ymouse;
                     }
                }
                if ((drag_area == 1) or (drag_area == 2)) {
                    point_xy_arry[0].x = point_xy_arry[0].x + ((_local2 - point_xy_arry[0].x) / BufferCoefficient);
                    point_xy_arry[0].y = point_xy_arry[0].y + ((_local3 - point_xy_arry[0].y) / BufferCoefficient);
                } else if ((drag_area == 3) or (drag_area == 4)) {
                    tem_array[0].x = tem_array[0].x + ((_local2 - tem_array[0].x) / BufferCoefficient);
                    tem_array[0].y = tem_array[0].y + ((_local3 - tem_array[0].y) / BufferCoefficient);
                }
                flip_ing_fun();
             }
        }
        function if_out_page_area_fun() {
            if ((((_xmouse > pax) and (_xmouse < pex)) and (_ymouse > pay)) and (_ymouse < pby)) {
                return (true);
            } else {
                return (false);
             }
        }
        function show_next_page_fun() {
            flip_end = true;
            on_page_v++;
            on_mc.gotoAndStop(on_page_v);
            remove_flip_next_page_fun();
            on_mc_MovieClipLoader_fun(on_mc);
        }
        function show_prev_page_fun() {
            flip_end = true;
            on_page_v--;
            on_mc.gotoAndStop(on_page_v);
            remove_flip_next_page_fun();
            on_mc_MovieClipLoader_fun(on_mc);
        }
        function show_the_page_fun(v) {
            flip_end = true;
            on_page_v = v;
            on_mc.gotoAndStop(on_page_v);
            remove_flip_next_page_fun();
            on_mc_MovieClipLoader_fun(on_mc);
        }
        function no_flip_page_fun() {
            flip_end = true;
            remove_flip_next_page_fun();
        }
        function remove_flip_next_page_fun() {
            delete onEnterFrame;
            if (!shadow_bottom1._visible) {
                shadow_bottom1._visible = true;
                shadow_bottom1._alpha = 0;
                shadow_bottom1.onEnterFrame = function () {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -