Flash FlexScroller剪切内容

Flash FlexScroller剪切内容,flash,apache-flex,actionscript-3,scroll,Flash,Apache Flex,Actionscript 3,Scroll,有一个小flex应用程序,内容可以缩放。 首先是一些代码 <s:Scroller verticalScrollPolicy="on" width="100%" height="100%"> <s:Group scaleX="{breite}" scaleY="{hoehe}" id="mapView" > <!-- zum zoomen --> <s:Group horizontalCenter="0" id=

有一个小flex应用程序,内容可以缩放。 首先是一些代码

<s:Scroller  verticalScrollPolicy="on"  width="100%" height="100%">



<s:Group scaleX="{breite}" scaleY="{hoehe}" 

         id="mapView" > <!-- zum zoomen -->

    <s:Group horizontalCenter="0"  id="kartePanel"  verticalCenter="0">
    <images:karte  height="630" width="430"   />


        <components:akwOnMap data="{biblis}" verticalCenter="{biblis.y}" horizontalCenter="{biblis.x}" 
                             scaleY="{negate}" scaleX="{negate}" toolTip="{biblis.name}"/>



        <components:akwOnMap data="{akw2}" verticalCenter="{akw2.y}" horizontalCenter="{akw2.x}" 
                             scaleY="{negate}" scaleX="{negate}" toolTip="{akw2.name}"/>

            <components:akwView scaleX="{negate}" data="{akw2}" scaleY="{negate}" verticalCenter="20" horizontalCenter="{80}" >
        </components:akwView> 
    </s:Group>
</s:Group>
</s:Scroller>

通过使用滑块将值从1更改为3,缩放效果良好。缩放的中点是容器(贴图)的中心

我的问题是:当我缩放时,滚动条会剪切一部分组。它从窗口放大了

私有函数checkScrolling():void
private function checkScrolling():void

{


var imgWidth:Number = mapView.width * mapView.scaleX;
    var imgHeight:Number = mapView.height * mapView.scaleY;

if (mapGroup.contentWidth < imgWidth ||
    mapGroup.contentHeight < imgHeight)
{
    var excessW:Number = imgWidth - mapGroup.contentWidth;
    var excessH:Number = imgHeight - mapGroup.contentHeight;
    mapGroup.setContentSize(imgWidth, imgHeight);
    /*
    if (scroller.horizontalScrollBar)
    {
        scroller.horizontalScrollBar.minimum = -excessW;
        scroller.horizontalScrollBar.maximum = excessW;
        mapGroup.horizontalScrollPosition = 0; 
    }
    */
    if (scroller.verticalScrollBar)
    {
        scroller.verticalScrollBar.minimum = -excessH;
        scroller.verticalScrollBar.maximum = excessH;
        mapGroup.verticalScrollPosition = 0;
    }
{ var imgWidth:Number=mapView.width*mapView.scaleX; var imgHeight:Number=mapView.height*mapView.scaleY; 如果(mapGroup.contentWidth

这很好。

我不确定这是如何涵盖你上一个问题的新领域:。我也不确定为什么,在上一个问题中,你选择了一个你说不起作用的答案。忘了更改我的评论,只是执行错误。现在要更改我的评论…现在也是另一个问题。