FlexPaper显示swf文件示例和参数设置
发布时间:2020-12-15 03:47:39 所属栏目:百科 来源:网络整理
导读:版本:2.2.1 示例: %@ page contentType="text/html;charset=UTF-8" language="java" %htmlhead titleFlexpaper例子/title meta http-equiv="Content-Type" content="text/html; charset=utf-8"/ script type="text/javascript" src="${ctx}/FlexPaper/js/j
版本:2.2.1示例:<%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <title>Flexpaper例子</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script type="text/javascript" src="${ctx}/FlexPaper/js/jquery.min.js"></script> <script type="text/javascript" src="${ctx}/FlexPaper/js/flexpaper.js"></script> <script type="text/javascript" src="${ctx}/FlexPaper/js/flexpaper_handlers.js"></script> </head> <body> <div id="documentViewer" class="flexpaper_viewer" style="position:absolute;left:10px;top:10px;width:80%;height:80%"></div> <script type="text/javascript"> function getContentPath() { var pathName = document.location.pathname; var index = pathName.substr(1).indexOf("/"); var path = pathName.substr(0,index + 1); return path; } var fp = $('#documentViewer').FlexPaperViewer( {config: { SwfFile: getContentPath() + '/readme.swf',Scale: 0.6,ZoomTransition: 'eaSEOut',ZoomTime: 0.5,ZoomInterval: 0.2,FitPageOnLoad: true,FitWidthOnLoad: true,FullScreenAsMaxWindow: true,ProgressiveLoading: true,MinZoomSize: 0.2,MaxZoomSize: 5,SearchMatchAll: false,InitViewMode: 'Portrait',ViewModeToolsVisible: true,ZoomToolsVisible: true,NavToolsVisible: true,CursorToolsVisible: true,SearchToolsVisible: true,localeChain: 'zh_CN',jsDirectory: getContentPath() + "/FlexPaper/js/",/*设置FlexPaper的js文件目录,包含FlexPaperVier.swf文件,否则默认在flex目录下.*/ cssDirectory: getContentPath() + "/FlexPaper/css/" }} ); </script> </body> </html>如果不能显示,注意设置 jsDirectory和 cssDirectory参数。 官网所给出的详细参数:ParametersThe following parameters can be used in FlexPaper
The parameters are passed using flashvars or by setting properties on the flexpaper component inside flex,depending on your choice of usage. The code block below shows an example of how the parameters can be passed using the pre-compiled flash version $('#documentViewer').FlexPaperViewer( (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容