简体   繁体   中英

Flex 3, iFrame, Scrollbars

I'm using an iFrame in a Flex 3 project. The problem is that if the user opens my site in a small browser window, they don't get scrollbars. How can I solve this problem? Is there a way to force the browser to put up scrollbars?

If I set the main app to horizontalScrollPolicy="on" verticalScrollPolicy="on" or to "auto" , then as you scroll down, the iFrame is stuck to the top of the browser window and obscures the content.

In the main app:

In the Application tag, I've got:

 horizontalScrollPolicy="off" verticalScrollPolicy="off"

My iFrame looks like:

<flexiframe:IFrame id="myiFrame"  source="http://www.mysite.com/myStuff.html"  x="315" y="20" width="498" height="65" scrollPolicy="off"   />

In the HTML Template, I've put a div around the swf and added css:

<style type="text/css">
    #blockwrapper{
    display: block;
    margin:0;
    padding:0;
    width: 980px;
    height: 800px;
    }
</style>



<div id="blockwrapper">
   <noscript>
      <object classid="clsid:D26CDA6E-AE6D-11cf-96B8-444553540000"
    id="${application}" width="${width}" height="${height}"
    codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
    <param name="movie" value="${swf}.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="${bgcolor}" />
    <param name="allowScriptAccess" value="sameDomain" />
    <embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
    width="${width}" height="${height}" name="${application}" align="middle"
    play="true"
    loop="false"
    quality="high"
    allowScriptAccess="sameDomain"
    type="application/x-shockwave-flash"
    pluginspage="http://www.adobe.com/go/getflashplayer">
    </embed>
    </object>
   </noscript>
 </div>

Any suggestions?

Thank you.

I've got it working. Below is what I had to do:

A)

<style>
body { margin: 0px; overflow:scroll }
</style>

<style type="text/css">
#blockwrapper{
    display: block;
    margin:0;
    padding:0;
    width: 960px;
    height: 800px;
}
</style>

B) I set the flex app's width and height in the Application tag to the same as that in the div.

Thank you.

-Laxmidi

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM