我在为Flash Builder 4.7构建的应用程序编写滚动屏幕时遇到了一些麻烦。我想编程,所以地图(images / ThirdFloor.png)不会滚动,但描述确实如此(images / FloorThreeGuide.png)。有没有办法做到这一点?或者我只能让整个屏幕滚动?谢谢!
没有滚动条的代码:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Level Three">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:HGroup>
<!--this is a background image-->
<s:Image source="images/background.png" height="100%" width="100%">
</s:Image>
</s:HGroup>
<s:VGroup width="100%" height="100%" verticalAlign="top" horizontalAlign="left">
<!--this tells the app to go back to the main page-->
<s:Button chromeColor="0x9b063a" label="Home" color="0xffffff" click="navigator.popView()" styleName="back" width="100%" />
<!--this is the third floor map-->
<s:Image source="images/ThirdFloor.png" width="100%" height="100%">
</s:Image>
<!-- this is the section I want to scroll -->
<s:Group>
<!--this is a description for the floor exhibits-->
<s:Image source="images/FloorThreeGuide.png" width="100%" height="100%">
</s:Image>
</s:Group>
</s:VGroup>
</s:View>
这是代码模拟在设备上播放时的样子 - 点击图片:
答案 0 :(得分:1)
您可以将您的论坛包装在一个滚动条中:
<!-- this is the section I want to scroll -->
<s:Scroller>
<s:Group>
<!--this is a description for the floor exhibits-->
<s:Image source="images/FloorThreeGuide.png" width="100%" height="100%">
</s:Image>
</s:Group>
<s:Scroller>