如何在应用程序上直接运行此功能。现在我仍然需要点击铅笔电影才能激活它。如果你需要更多编码..请告诉我..HELP请....
private function PencilTool(e:MouseEvent):void
{
/* Quit active tool */
quitActiveTool();
/* Set to Active */
active = "Pencil";
/* Listeners */
board.addEventListener(MouseEvent.MOUSE_DOWN, startPencilTool);
board.addEventListener(MouseEvent.MOUSE_UP, stopPencilTool);
/* Highlight */
highlightTool(pencil);
hideTools(eraser, txt);
ct.color = activeColor;
shapeSize.transform.colorTransform = ct;
}
答案 0 :(得分:0)
在构造函数或init方法中调用PencilTool(null)
?
答案 1 :(得分:0)
将PencilTool函数声明更改为:
private function PencilTool(e:MouseEvent = null):void {
然后,只需调用PencilTool(),无论你想要什么......