妙网科技 妙网科技 首页 妙网科技 电子杂志 妙网科技 iebook Actionscript2.0 脚本

iebook Actionscript2.0 脚本

所属栏目: 电子杂志 | 更新时间:2016-7-9 | 阅读:4352 次

注:在插入的内页flash中,要想调用以下参数(或函数)或者自制按钮的自定义函数,请在舞台第一帧添加this._lockroot=false语句。

转到封面 _root.Zine1.gotoCover()
转到目录 _root.Zine1.gotoContent()
转到封底 _root.Zine1.gotoBCover()
转到某页 _root.Zine1.gotopage(int(pageNumber)+1) (注:pageNumber 从0开始)
设置音量 _root.Zine1.setmusicvol(v) (注:取值范围0~100)
获取音量 _root.Zine1.getmusicvol()
转到上一页 _root.Zine1.prevpage()
转到下一页 _root.Zine1.nextpage()
当前页 _root.Zine1.getpage()
当前帧 _root.Zine1.getframeplayed()
总页数 _root.Zine1.getmaxpage()
全屏/1:1显示 _root.Zine1.screenfull()
最小化 _root.Zine1.minimize()
退出 _root.Zine1.exit();
单页宽度 _root.Zine1.getpageW();
单页高度 _root.Zine1.getpageH();
屏幕宽度 System.capabilities.screenResolutionX;
屏幕高度 System.capabilities.screenResolutionY;
隐藏底部版权 _root.Zine1.copy_mc.Copyright._visible=false

========================

iebook内页专用
获取深度  this._parent.getDepth();
获取角度  this._parent._rotation;
获取比例  this._xscale;

=====================

复制地址 _root.Zine1.AppCommand(“CopyUrl”, “”)

加载 ie搜索按钮 _root.Zine1.loadTool(“iesearch”, “iesearch.swf”)

加载在线交流按钮 _root.Zine1.loadTool(“comment”, “comment.swf”)

加载即时通信功能

var Info = _root.Zine1.getZineInfo();
if (Info.IM.toLowerCase() == "qq") {
    getURL (("tencent://message/?uin=" + Info.QQ) + "&Site=iebook.cn&Menu=yes");
} else {
    getURL ("msnim:chat?contact=" + Info.MSN);
}

加载涂鸦按钮 _root.Zine1.loadTool(“booktag”, “booktag.swf”)

加载打印按钮 _root.Zine1.loadTool(“print”, “print.swf”)

加载帮助按钮 _root.Zine1.loadTool(“help”, “help.swf”)

加载设置按钮 _root.Zine1.loadTool(“config”, “config.swf”)

加载统计系统 _root.Zine1.loadTool(“count”, “count.swf”)

其他按钮

Question.swf 文件调查

recommend.swf

=====================

获取名称变量(赋值:caption)

 _root.Zine1.getCaption()
if (caption.type.toLowerCase() == "string") {
    this.caption_txt.autoSize = "left";
    this.caption_txt.text = caption.value;
    bg._width = caption_txt._width + 10;
    bg._height = caption_txt._height;
} else {
    bg._visible = false;
    caption_txt._visible = false;
    this.createEmptyMovieClip("logo", 0);
    eobj.onLoadInit = function (t) {
        t._y = 18 - t._height;
    };
    mc_l.addListener(eobj);
    mc_l.loadClip(caption.value, this.logo);
}

打开名称链接 getURL (caption.link, “_blank”);

获取版权信息 _root.Zine1.getCopyright()

获取版权链接 _root.Zine1.getCopyLink()

====================

on(rollOver){
    _root.showalt("提示内容"); //显示提示信息
}

on(releaseOutside,rollOut){
    _root.hidealt();//隐藏提示信息
}

====================

内容定位

function reposmc(mc, bottom, right) {
    mc._x = mc._x + (right * (mag_w - 375));
    mc._y = mc._y + (bottom * ((mag_h - 550) / 2));
}

var comm1 = this.attachMovie("communicate", "comm1", -1);
stop();
br.prve_b._visible = false; //上一页按钮不可见
var eobj = new Object();
eobj.Magflipover = function (target) {
    br.prve_b._visible = true; //上一页按钮可见
    br.next_b._visible = true; //下一页按钮可见
    if (_root.Zine1.getpage() == _root.Zine1.getmaxpage()) {
        br.next_b._visible = false;
    }
    if (_root.Zine1.getpage() == 0) {
        br.prve_b._visible = false;
    }
};

_root.Zine1.addEventListener("Magflipover", eobj);
if (_root.Zine1.getshowplaystate() == false) {
    bl.playstate.unloadMovie();
}
var mag_w = _root.Zine1.getpageW();
var mag_h = _root.Zine1.getpageH();
reposmc(br, 2, 2);
reposmc(bl, 2, 0);
reposmc(tr, 0, 2);
reposmc(iebookbq, 2, 0.5);
reposmc(cpt, 2, 0.5);
reposmc(hidenbt, 0, 2);

===============================================

zine1 有以下成员

ws: _level0.Zine1.ws
initmc: _level0.Zine1.initmc
bg: _level0.Zine1.bg
fullscreen: true
maxp: 4
bgimgurl:
sendreport: false
TemplateMode: true
screenH: 768
screenW: 1024
pageH: 650
pageW: 475
ShowInit: false
Shadowdepth: 26
ShadowFilter: 7
pagefengdis: false
showplaystate: false
AutoSpeedSetting: 6000
AutoEnabledSetting: false
BscreenH: 768
BscreenW: 1366
bs: [object Object]
toolscon2: _level0.Zine1.toolscon2
toolscon: _level0.Zine1.toolscon
toolbar1: _level0.Zine1.toolbar1 // 按钮
dface: [object Object]
mag: _level0.Zine1.mag
eObject: [object Object]
BaseURL:
toolsloader: [object Object]
dispatchQueue: [type Function]
dispatchEvent: [type Function]
removeEventListener: [type Function]
addEventListener: [type Function]
toolbar1: _level0.Zine1.toolbar1
initmc: _level0.Zine1.initmc
ws: _level0.Zine1.ws
timer: _level0.Zine1.timer
toolscon2: _level0.Zine1.toolscon2
toolscon: _level0.Zine1.toolscon
mag: _level0.Zine1.mag
copy_mc: _level0.Zine1.copy_mc // 版权
bg: _level0.Zine1.bg

===============================================

2013年11月16日

代码来源经典视频收藏版4

_root.online 电子杂志是否为在线版本

_root.getFLVPath(path) 获取FLV视频路径(此函数可能程序自带,或自定义函数);如:_root.getFLVPath(“1.flv”)

function getFLVPath(path){
    return ("http://"+ path);
}

video 为FLVPlayback组件

video 的事件

onClipEvent (construct){
    autoPlay = true;
    autoRewind = true;
    autoSize = false;
    bufferTime = 1.000000E-001;
    contentPath = "";
    isLive = false;
    maintainAspectRatio = true;
    skin = "";
    skinAutoHide = false;
    totalTime = 0;
    volume = 100;
}
video.bufferingBar = my_bufferingBar; //my_bufferingBar为用户定义的元件名
video.pauseButton = my_pauseButton; //同上
video.contentPath = _root.getFLVPath(_parent._parent.attachfile4); //参阅楼上
listenerObject = new Object();
listenerObject.ready = function (eventObject){
    playpauseButton.gotoAndStop(2);
    if (video.width < 485){
        video._x = (485 - video.width) / 2 + 0;
    }
    if (video.height < 270){
        video._y = (270 - video.height) / 2 + 30;
    }
};
listenerObject.complete = function (eventObject){
    playpauseButton.gotoAndStop(1);
};
video.addEventListener("ready", listenerObject);
video.addEventListener("complete", listenerObject);



/*----------------华丽的分割线------------------*/
listenerObject = new Object();
listenerObject.ready = function (eventObject){
    ctr.playpauseButton.gotoAndStop(2); //ctr为影片剪辑,内含播放、暂停按钮
    video.maintainAspectRatio = false;
    video.width = 485;
    video.height = 270;
};
listenerObject.complete = function (eventObject){
    ctr.playpauseButton.gotoAndStop(1);
};
video.addEventListener("ready", listenerObject);
video.addEventListener("complete", listenerObject);