tween24、tweenCountの仕様orバグ? forked from: [Tween24 ver2.0] manualUpdate() Test
forked from [Tween24 ver2.0] manualUpdate() Test (diff: 38)
ActionScript3 source code
/**
* Copyright yamadori ( http://wonderfl.net/user/yamadori )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/aqq3
*/
package
{
import a24.tween.Tween24;
import a24.util.Align24;
import flash.display.Sprite;
import flash.events.Event;
[SWF(backgroundColor="#FFFFFF", frameRate="60", width="465", height="465")]
/**
*
*/
public class Main extends Sprite
{
public function Main()
{
var boxes1:Array = [];
boxes1.push(addChild(new Box() as Box));
boxes1.push(addChild(new Box() as Box));
boxes1[1].y = 100;
var tween1:Tween24 = Tween24.serial(
Tween24.tweenCount(boxes1, 60).rotation(90).align(Align24.BOTTOM_RIGHT),
Tween24.tweenCount(boxes1, 60).rotation(180).align(Align24.TOP_RIGHT),
Tween24.tweenCount(boxes1, 60).rotation(270).align(Align24.TOP_LEFT),
Tween24.tweenCount(boxes1, 60).rotation(0).align(Align24.BOTTOM_LEFT)
);
tween1.play();
var boxes2:Array = [];
boxes2.push(addChild(new Box() as Box));
boxes2.push(addChild(new Box() as Box));
boxes2[0].y = 200;
boxes2[1].y = 300;
var tween2:Tween24 = Tween24.serial(
Tween24.tween(boxes2, 1).rotation(90).align(Align24.BOTTOM_RIGHT),
Tween24.tween(boxes2, 1).rotation(180).align(Align24.TOP_RIGHT),
Tween24.tween(boxes2, 1).rotation(270).align(Align24.TOP_LEFT),
Tween24.tween(boxes2, 1).rotation(0).align(Align24.BOTTOM_LEFT)
);
tween2.play();
var box:Box = addChild(new Box()) as Box;
box.y = 400;
var tween3:Tween24 = Tween24.serial(
Tween24.tweenCount(box, 60).rotation(90).align(Align24.BOTTOM_RIGHT),
Tween24.tweenCount(box, 60).rotation(180).align(Align24.TOP_RIGHT),
Tween24.tweenCount(box, 60).rotation(270).align(Align24.TOP_LEFT),
Tween24.tweenCount(box, 60).rotation(0).align(Align24.BOTTOM_LEFT)
);
tween3.play();
}
}
}
import flash.display.GradientType;
import flash.display.SpreadMethod;
import flash.display.Sprite;
import flash.geom.Matrix;
class Box extends Sprite
{
public function Box()
{
var gradMrx : Matrix = new Matrix();
gradMrx.createGradientBox(50, 50, Math.PI / 2, 0, 0);
this.graphics.beginGradientFill(GradientType.LINEAR, [0xffe76f, 0x000000], [1, 1], [0, 255], gradMrx, SpreadMethod.PAD);
this.graphics.drawRect(0, 0, 50, 50);
}
}
