StageXL StageXL for Dart


2D Animation & Interactivity for the Modern Web


 

 

class SmileyFace extends Sprite {
	Shape shape;
	Shape shape_1;
	Shape shape_2;
	Shape shape_3;
	Shape shape_4;
	Shape shape_5;
	Shape shape_6;
	Shape shape_7;

	SmileyFace() {
		// Layer 1
		shape = _draw(54,78.2)
		.f().s(0xFF000000).ss(0.8,0,0,4).p("EgjwgLxQDvHRGPFKQGBFBHfCZQHgCZHxglQIGgoHRjvQFki4EckaQEckcC3lkQjBHRllFcQlZFSnAC4QnAC5niACQnyADnRjCQnEi8lalaQlblZi8nEg").shape
		..setTransform(54,78.2,0.142,0.142);

		shape_1 = _draw(20,65.3)
		.f().s(0xFF000000).ss(0.5,1,0,4).p("AF8kcQhCEDjWCeQjUChkLgJ").shape
		..setTransform(20,65.3,0.142,0.142);

		shape_2 = _draw(70.2,35.1)
		.f(0xFF000000).s().p("AlPIaQiMjfAAk7QAAk6CMjgQCLjeDEgBQDFABCLDeQCMDgAAE6QAAE7iMDfQiMDgjEAAQjEAAiLjgg").shape
		..setTransform(70.2,35.1,0.142,0.142);

		shape_3 = _draw(88,65.3)
		.f().s(0xFF000000).ss(0.5,1,0,4).p("Al7kcQBCEDDWCeQDUChELgJ").shape
		..setTransform(88,65.3,0.142,0.142);

		shape_4 = _draw(37.8,35.1)
		.f(0xFF000000).s().p("AlPIaQiMjfAAk7QAAk6CMjgQCLjeDEgBQDFABCLDeQCMDgAAE6QAAE7iMDfQiLDgjFAAQjDAAiMjgg").shape
		..setTransform(37.8,35.1,0.142,0.142);

		shape_5 = _draw(54,54)
		.rf([0xb2FFFFFF,0x0FFFFFF],[0,1],-228.5,-228.5,0,-228.5,-228.5,381).s().p("EgXKA22QqrkhoPoQQoPoPkiqsQkrrEAAsGQAAsGErrDQEiqsIPoPQIPoQKrkhQLFkrMFAAQMGAALEErQKsEhIPIQQIQIPEgKsQEsLDAAMGQAAMGksLEQkgKsoQIPQoPIQqsEhQrEErsGAAQsFAArFkrg").shape
		..setTransform(54,54,0.142,0.142);

		shape_6 = _draw(54,54)
		.f().s(0xFF000000).ss(0.2,0,0,4).p("EAAAg7gQMHAALDErQKsEhIPIQQIQIPEhKsQErLDAAMGQAAMGkrLEQkhKsoQIPQoPIQqsEhQrDErsHAAQsGAArEkrQqrkhoPoQQoQoPkhqsQkrrEAAsGQAAsGErrDQEhqsIQoPQIPoQKrkhQLEkrMGAAg").shape
		..setTransform(54,54,0.142,0.142);

		shape_7 = _draw(54,54)
		.rf([0xFFFBFF29,0xFFFBFF29,0xFFEAF126,0xFFE4EA25],[0,0.749,0.949,1],0,0,0,0,0,381).s().p("EgXKA22QqrkhoPoQQoPoPkiqsQkrrEAAsGQAAsGErrDQEiqsIPoPQIPoQKrkhQLFkrMFAAQMGAALEErQKsEhIPIQQIQIPEgKsQEsLDAAMGQAAMGksLEQkgKsoQIPQoPIQqsEhQrEErsGAAQsFAArFkrg").shape
		..setTransform(54,54,0.142,0.142);

		addChild(shape_7);
		addChild(shape_6);
		addChild(shape_5);
		addChild(shape_4);
		addChild(shape_3);
		addChild(shape_2);
		addChild(shape_1);
		addChild(shape);
	}
}

class SmileyRoll extends MovieClip {
	SmileyFace smileFace;

	SmileyRoll([String mode, int startPosition, bool loop])
			: super(mode, startPosition, loop, {}) {
		// Test File
		smileFace = new SmileyFace()
		..name = "smileFace"
		..setTransform(74.1,205.1,1,1,0,0,0,54,54)
		..alpha = 0;

		timeline.addTween(_tween(smileFace).to({"rotation":3.14,"x":728,"y":205,"alpha":1},120).wait(1));

	}
}