开发者

How do I get my Flex app to scroll vertically when view in a browser?

I have a web app built in Flash Builder 4.5. Its dimensions are 1150 x 900. When I try to view it on a smaller monitor or lower resolution, I can only scroll horizontally. I need it to scroll vertically. Is there a setting I am missing or c开发者_运维知识库ould it be something else. I am not going to post any code at this time because I do not believe it is a syntax issue. If anyone feels I may be wrong, I will post the code needed. Thanks

http://dev.listgiants.com/Main.html is the site URL.


Simple enough. It's all about how you setup your SWFObject in your HTML. From your actual HTML Source:

 swfobject.embedSWF(
                "Main.swf", "flashContent", 
                "1150", "100%", 
                swfVersionStr, xiSwfUrlStr, 
                flashvars, params, attributes);

You'll notice that you have your width set as an absolute and your height as a percentage. You either need to set both to absolutes or set both to percentages and let Flex do the scrolling for you within a container. Flex should automatically add scrollbars if the content of a container set to width/height 100%.


The height parameter in the HTML is set as 100%, should be a fixed size.

You have this:

 swfobject.embedSWF(
                "Main.swf", "flashContent", 
                "1150", "100%", 

Should be something like this:

 swfobject.embedSWF(
                "Main.swf", "flashContent", 
                "1150", "900", 


you can specify it in style.In index.html file, within style declaration, paste following code,

html, body  {height:100%; width:100%; min-width:1024px; min-height:768px; overflow:auto; position:absolute;}

i hope it should also works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜