iebook Actionscript2.0 腳本
注:在插入的內(nèi)頁flash中,要想調(diào)用以下參數(shù)(或函數(shù))或者自制按鈕的自定義函數(shù),請(qǐng)?jiān)谖枧_(tái)第一幀添加this._lockroot=false語句。
轉(zhuǎn)到封面 _root.Zine1.gotoCover()
轉(zhuǎn)到目錄 _root.Zine1.gotoContent()
轉(zhuǎn)到封底 _root.Zine1.gotoBCover()
轉(zhuǎn)到某頁 _root.Zine1.gotopage(int(pageNumber)+1) (注:pageNumber 從0開始)
設(shè)置音量 _root.Zine1.setmusicvol(v) (注:取值范圍0~100)
獲取音量 _root.Zine1.getmusicvol()
轉(zhuǎn)到上一頁 _root.Zine1.prevpage()
轉(zhuǎn)到下一頁 _root.Zine1.nextpage()
當(dāng)前頁 _root.Zine1.getpage()
當(dāng)前幀 _root.Zine1.getframeplayed()
總頁數(shù) _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;
隱藏底部版權(quán) _root.Zine1.copy_mc.Copyright._visible=false
========================
iebook內(nèi)頁專用
獲取深度 this._parent.getDepth();
獲取角度 this._parent._rotation;
獲取比例 this._xscale;
=====================
復(fù)制地址 _root.Zine1.AppCommand(“CopyUrl”, “”)
加載 ie搜索按鈕 _root.Zine1.loadTool(“iesearch”, “iesearch.swf”)
加載在線交流按鈕 _root.Zine1.loadTool(“comment”, “comment.swf”)
加載即時(shí)通信功能
加載涂鴉按鈕 _root.Zine1.loadTool(“booktag”, “booktag.swf”)
加載打印按鈕 _root.Zine1.loadTool(“print”, “print.swf”)
加載幫助按鈕 _root.Zine1.loadTool(“help”, “help.swf”)
加載設(shè)置按鈕 _root.Zine1.loadTool(“config”, “config.swf”)
加載統(tǒng)計(jì)系統(tǒng) _root.Zine1.loadTool(“count”, “count.swf”)
其他按鈕
Question.swf 文件調(diào)查
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”);
獲取版權(quán)信息 _root.Zine1.getCopyright()
獲取版權(quán)鏈接 _root.Zine1.getCopyLink()
====================
on(rollOver){_root.showalt("提示內(nèi)容"); //顯示提示信息
}
on(releaseOutside,rollOut){
_root.hidealt();//隱藏提示信息
}
====================
內(nèi)容定位
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 // 版權(quán)
bg: _level0.Zine1.bg
===============================================
2013年11月16日
代碼來源經(jīng)典視頻收藏版4
_root.online 電子雜志是否為在線版本
_root.getFLVPath(path) 獲取FLV視頻路徑(此函數(shù)可能程序自帶,或自定義函數(shù));如:_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為影片剪輯,內(nèi)含播放、暫停按鈕
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);