package com.powerflasher.SampleApp {
import flash.events.MouseEvent;
import flash.display.Sprite;
public class test1 extends Sprite {
public function test1()
{
NewCircle1();
NewButton1();
Magic();
}
private function NewButton1():void
{
var NewButton:Sprite = new Sprite();
NewButton.graphics.beginFill(0x0000ff,1);
NewButton.graphics.drawRect(100, 100, 50, 50);
NewButton.graphics.endFill();
addChild(NewButton);
NewButton.addEventListener(MouseEvent.CLICK, Magic);
}
private function NewCircle1():void
{
var NewCircle:Sprite = new Sprite();
NewCircle.graphics.beginFill(0x000000,1);
NewCircle.graphics.drawCircle(400, 500, 50);
NewCircle.graphics.endFill();
addChild(NewCircle);
}
private function Magic():void {
Tweenlite.to(NewCircle1(), 2+Math.random()*6, {x:Math.random()*20, y:Math.random()*25, scaleX:Math.random()*3, ScaleY:Math.random()*5});
}}}
我要做的就是绘制正方形,绘制圆形,然后在正方形上单击鼠标以将圆形移动到随机位置
收到错误“未声明变量'Tweenlite'”,不知道..