【函数】 | void show(String url, String style) |
【函数】 | void show(String id, String url, String style, int startIndex, String pregFilter) |
【说明】 | 显示翻页电子书对话框。 |
【返回】 | 无 |
【参数】 |
id:翻页对话框的ID,如果缺省,使用path作为ID。
url:文本格式的内容文件。 style:对话框样式,请参见样式表。 startIndex:起始页码,注意,和显示的页码不同,从0开始。 pregFilter:正则过滤器的ID,参见rexseePregFilter对象,在调整已有网页直接载入到电子书中时非常有用,为""表示无正则过滤器。 |
【格式】 |
电子书文件内容应该是文本格式,以换行符"\n"分段。但是可以使用以下几个特殊标签:
|
【样式】 |
|
【示例】 |
事件代码
下载背景图片
rexseeApplication.setDefaultEncoding('GB2312');
运行示例
rexseePageFlip.show('testFlipBook','http://www.rexsee.com/rexsee/story.txt','background-color:'+rexseeStorage.getRoot()+'/download/pageBackground.jpg;label-background-color:'+rexseeStorage.getRoot()+'/download/pageBackground.jpg;label-padding:40 20 35 20;font-size:24px;color:#000000;text-align:left;line-height:120%;border-width:0px;border-color:#0000FF;window-align:center;window-vertical-align:top;width:'+document.body.clientWidth+';height:'+Math.round((rexseeScreen.getScreenHeight()-rexseeScreen.getNoticeBarHeight())/rexseeScreen.getScreenDensityScale()-200)+';window-modeless:true;',2,''); |
【函数】 | void showData(String id, String data, String style, int startIndex) |
【说明】 | 显示翻页对话框。 |
【返回】 | 无 |
【参数】 |
id:翻页对话框的ID。
data:电子书内容。 style:对话框样式,请参见样式表。 startIndex:起始页码,注意,和显示的页码不同,从0开始。 |
【示例】 | 无 |
【函数】 | void dismiss(String id) |
【说明】 | 隐藏翻页对话框。 |
【返回】 | 无 |
【参数】 | id:翻页对话框的ID。 |
【示例】 |
rexseePageFlip.dismiss('testFlipBook');
运行示例
|
【函数】 | void dismissAll() |
【说明】 | 隐藏所有翻页对话框。 |
【返回】 | 无 |
【参数】 | 无 |
【示例】 |
rexseePageFlip.dismissAll();
运行示例
|
【函数】 | int setPageIndex(String id, int pageIndex) |
【说明】 | 设置电子书当前页码,即翻页到指定页码,注意,和显示的页码不同,从0开始。 |
【返回】 | 无 |
【参数】 | id:翻页对话框的ID。 pageIndex:翻到的页码。 |
【示例】 |
rexseePageFlip.setPageIndex('testFlipBook',3);
运行示例
|
【函数】 | int getPageIndex(String id) |
【说明】 | 读取电子书当前页码,注意,和显示的页码不同,从0开始。 |
【返回】 | 无 |
【参数】 | id:翻页对话框的ID。 |
【示例】 |
alert(rexseePageFlip.getPageIndex('testFlipBook'));
运行示例
|
【函数】 | JsonArray getPageIndexes(String id) |
【说明】 | 读取电子书的目录,所有以<title>.......</title>包含的字符串都被当作目录项。 |
【返回】 | Json字符串,可以用eval('('+json+')')转换为JavaScript数组。 |
【参数】 | id:翻页对话框的ID。 |
【示例】 | 无 |
【函数】 | int getPageTotal(String id) |
【说明】 | 读取电子书页数。 |
【返回】 | 无 |
【参数】 | id:翻页对话框的ID。 |
【示例】 |
alert(rexseePageFlip.getPageTotal('testFlipBook'));
运行示例
|
【函数】 | void setStyle(String id, String style) |
【说明】 | 设置弹出窗口的样式。 |
【返回】 | 无 |
【参数】 |
id:字符串,弹出窗口的id。
style:样式表。 |
【示例】 |
rexseePageFlip.setStyle('testFlipBook','window-vertical-align:top;');
运行示例
|
【函数】 | String getStyle(String id, String name) |
【说明】 | 读取弹出窗口的样式。 |
【返回】 | 样式的值。 |
【参数】 |
id:字符串,弹出窗口的id。
name:样式名称。 |
【示例】 |
alert(rexseePageFlip.getStyle('testFlipBook','width'));
运行示例
|
【函数】 | boolean exists(String id) |
【说明】 | 判断弹出窗口是否存在。 |
【返回】 | true或false。 |
【参数】 | id:字符串,弹出窗口的id。 |
【示例】 |
alert(rexseePageFlip.exists('testFlipBook'));
运行示例
|
【函数】 | int size() |
【说明】 | 弹出窗口的个数。 |
【返回】 | 弹出窗口的个数。 |
【参数】 | 无 |
【示例】 |
alert(rexseePageFlip.size());
运行示例
|
【函数】 | JsonArray getIds() |
【说明】 | 弹出窗口的ID。 |
【返回】 | Json数组,用eval('('+json')')转换为JavaScript数组。 |
【参数】 | 无 |
【示例】 |
alert(rexseePageFlip.getIds());
运行示例
|