1的最终解决方案,利用Monkey Patch重定义了一下FlexSprite

Panel背景为黑色,Canvas背景为灰色
点击按钮出现滚动条

滚动条出现后右下方为黑色
[FlexSprite.as]
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
// All Rights Reserved. The following is Source Code and is subject to all
// restrictions on such code as contained in the End User License Agreement
// accompanying this product.
//
////////////////////////////////////////////////////////////////////////////////
package mx.core
{
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.Event;
import mx.events.FlexEvent;
import mx.utils.NameUtil;
/**
* FlexSprite is a subclass of the Player's Sprite class
* and the superclass of UIComponent.
* It overrides the <code>toString()</code> method
* to return a string indicating the location of the object
* within the hierarchy of DisplayObjects in the application.
*/
public dynamic class FlexSprite extends Sprite
{
//include "../core/Version.as";
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* <p>Sets the <code>name</code> property to a string
* returned by the <code>createUniqueName()</code>
* method of the mx.utils.NameUtils class.</p>
*
* <p>This string is the name of the object's class concatenated
* with an integer that is unique within the application,
* such as <code>"Button17"</code>.</p>
*
* @see flash.display.DisplayObject#name
* @see mx.utils.NameUtil#createUniqueName()
*/
public function FlexSprite()
{
super();
try
{
name = NameUtil.createUniqueName(this);
}
catch(e:Error)
{
// The name assignment above can cause the RTE
// Error #2078: The name property of a Timeline-placed
// object cannot be modified.
// if this class has been associated with an asset
// that was created in the Flash authoring tool.
// The only known case where this is a problem is when
// an asset has another asset PlaceObject'd onto it and
// both are embedded separately into a Flex application.
// In this case, we ignore the error and toString() will
// use the name assigned in the Flash authoring tool.
}
if(this is Container)
{
addEventListener(FlexEvent.UPDATE_COMPLETE,updateCompleteHandler);
}
}
//--------------------------------------------------------------------------
//
// Overridden methods
//
//--------------------------------------------------------------------------
/**
* Returns a string indicating the location of this object
* within the hierarchy of DisplayObjects in the Application.
* This string, such as <code>"MyApp0.HBox5.Button17"</code>,
* is built by the <code>displayObjectToString()</code> method
* of the mx.utils.NameUtils class from the <code>name</code>
* property of the object and its ancestors.
*
* @return A String indicating the location of this object
* within the DisplayObject hierarchy.
*
* @see flash.display.DisplayObject#name
* @see mx.utils.NameUtil#displayObjectToString()
*/
override public function toString():String
{
return NameUtil.displayObjectToString(this);
}
private function updateCompleteHandler(event:Event):void
{
var whiteBox:DisplayObject = DisplayObject(this["rawChildren"].getChildByName("whiteBox"));
if(whiteBox)
{
this["rawChildren"].removeChild(whiteBox);
}
}
}
}