2011-03-24 22 views
3

我使用flexpage和pdf2swf为我的pdf文件生成swf并在我的页面中显示它。flexpaper默认的两个页面视图设置

这是我用过

<script type="text/javascript"> 
    highlightPageMenuLink(); 
    var swfVersionStr = "10.0.0"; // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. 
    var xiSwfUrlStr = "playerProductInstall.swf"; // To use express install, set to playerProductInstall.swf, otherwise the empty string. 
    var flashvars = { 
     SwfFile : escape("<%= current_user.books.first.name%>.swf"), 
     Scale : 0.6, 
     ZoomTransition : "easeOut", 
     ZoomTime : 0.5, 
     ZoomInterval : 0.1, 
     FitPageOnLoad : false, 
     FitWidthOnLoad : true, 
     PrintEnabled : false, 
     FullScreenAsMaxWindow : false, 
     ProgressiveLoading : true, 
     PrintToolsVisible : false, 
     ViewModeToolsVisible : true, 
     ZoomToolsVisible : true, 
     FullScreenVisible : true, 
     NavToolsVisible : true, 
     CursorToolsVisible : true, 
     SearchToolsVisible : false, 
     localeChain: "en_US" 
    }; 

    var params = {} 
    params.quality = "high"; 
    params.bgcolor = "#ffffff"; 
    params.allowscriptaccess = "sameDomain"; 
    params.allowfullscreen = "true"; 
    var attributes = {}; 
    attributes.id = "FlexPaperViewer"; 
    attributes.name = "FlexPaperViewer"; 
    swfobject.embedSWF("FlexPaperViewer.swf", "flashContent", "650", "605", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes); 
    swfobject.createCSS("#flashContent", "display:block;text-align:left;"); 
</script> 

ViewModeToolsVisible设置为true,设置这个我可以看到选项来查看单页模式页,第二页模式和Thumb模式。 如何使我的默认两个页面查看模式?

谢谢。

回答

4

有办法显示默认情况下显示两个页面视图。我们只要插入flexpaper_flash.js

function onDocumentLoaded(totalPages){ 
getDocViewer().switchMode('TwoPage');} 

但后来我有一个问题,这是第一次加载在单页模式,然后将观点转化为两页的模式下进行呼叫。然后,我不得不改变

ProgressiveLoading:真

ProgressiveLoading:假