我收到一条错误消息: “尝试通过静态类型 flash.display:Sprite.ssd.rotation(90)} 的引用访问无法访问的方法旋转” 我只想知道双击图像时如何将图像旋转90 度.
var shootingstar:Loader = new Loader();
shootingstar.load(new URLRequest("http://i51.tinypic.com/m8jp7m.png"));
shootingstar.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadingComplete);
var ssd:Sprite = new Sprite();
function onLoadingComplete(event:Event):void
{
ssd.addChild( event.currentTarget.loader.content );
ssd.addEventListener(MouseEvent.MOUSE_DOWN, drag);
ssd.addEventListener(MouseEvent.MOUSE_UP, drop);
ssd.addEventListener(MouseEvent.DOUBLE_CLICK, rotate)
ssd.height=180
ssd.width=124
}
function drag(event:MouseEvent):void{
ssd.startDrag()
}
function drop(event:MouseEvent):void{
ssd.stopDrag()
}
function rotate():void{
ssd.rotation(90)
}