Last active
February 3, 2016 22:02
-
-
Save scottmessinger/a61723a16d9f7e3a3961 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (lib, img, cjs, ss) { | |
var p; // shortcut to reference prototypes | |
// library properties: | |
lib.properties = { | |
width: 1000, | |
height: 1000, | |
fps: 24, | |
color: "#FFFFFF", | |
manifest: [] | |
}; | |
// symbols: | |
(lib.Tween2 = function() { | |
this.initialize(); | |
// Layer 1 | |
this.shape = new cjs.Shape(); | |
this.shape.graphics.f("#0066CC").s().p("A0OLBIAA2BMAocAAAIAAWBg"); | |
this.addChild(this.shape); | |
}).prototype = p = new cjs.Container(); | |
p.nominalBounds = new cjs.Rectangle(-129.5,-70.5,259,141); | |
(lib.Tween1 = function() { | |
this.initialize(); | |
// Layer 1 | |
this.shape = new cjs.Shape(); | |
this.shape.graphics.f("#0066CC").s().p("A0NLBIAA2BMAobAAAIAAWBg"); | |
this.addChild(this.shape); | |
}).prototype = p = new cjs.Container(); | |
p.nominalBounds = new cjs.Rectangle(-129.5,-70.5,259,141); | |
// stage content: | |
(lib.DemoFlashSquare = function(mode,startPosition,loop) { | |
this.initialize(mode,startPosition,loop,{}); | |
// Layer 1 | |
this.instance = new lib.Tween1("synched",0); | |
this.instance.setTransform(216.5,133.5); | |
this.instance_1 = new lib.Tween2("synched",0); | |
this.instance_1.setTransform(800.6,131.5); | |
this.instance_1._off = true; | |
this.timeline.addTween(cjs.Tween.get(this.instance).to({x:556},6,cjs.Ease.get(-1)).to({_off:true,x:800.6,y:131.5},5,cjs.Ease.get(1)).wait(43)); | |
this.timeline.addTween(cjs.Tween.get(this.instance_1).wait(6).to({_off:false},5,cjs.Ease.get(1)).to({y:441.6},8,cjs.Ease.get(-1)).to({y:875.1},6,cjs.Ease.get(1)).to({x:474.1},7,cjs.Ease.get(-1)).to({x:201},7,cjs.Ease.get(1)).to({y:485.5},6,cjs.Ease.get(-1)).to({y:160.9},8,cjs.Ease.get(1)).wait(1)); | |
}).prototype = p = new cjs.MovieClip(); | |
p.nominalBounds = new cjs.Rectangle(587,563,259,141); | |
})(lib = lib||{}, images = images||{}, createjs = createjs||{}, ss = ss||{}); | |
var lib, images, createjs, ss; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none" x="0px" y="0px" width="1000px" height="1000px" viewBox="0 0 1000 1000"> | |
<defs> | |
<g id="Tween_2_0_Layer0_0_FILL"> | |
<path fill="#0066CC" stroke="none" d=" | |
M 697.05 204 | |
L 697.05 63 438.05 63 438.05 204 697.05 204 Z"/> | |
</g> | |
</defs> | |
<g transform="matrix( 1, 0, 0, 1, 201,160.9) "> | |
<g transform="matrix( 1, 0, 0, 1, -567.55,-133.5) "> | |
<use xlink:href="#Tween_2_0_Layer0_0_FILL"/> | |
</g> | |
</g> | |
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Demo Flash Output</title> | |
<script src="http://code.createjs.com/easeljs-0.8.1.min.js"></script> | |
<script src="http://code.createjs.com/tweenjs-0.6.1.min.js"></script> | |
<script src="http://code.createjs.com/movieclip-0.8.1.min.js"></script> | |
<script src="Demo Flash Output.js"></script> | |
<script> | |
var canvas, stage, exportRoot; | |
function init() { | |
canvas = document.getElementById("canvas"); | |
exportRoot = new lib.DemoFlashSquare(); | |
stage = new createjs.Stage(canvas); | |
stage.addChild(exportRoot); | |
stage.update(); | |
createjs.Ticker.setFPS(lib.properties.fps); | |
createjs.Ticker.addEventListener("tick", stage); | |
} | |
</script> | |
</head> | |
<body onload="init();" style="background-color:#D4D4D4"> | |
<canvas id="canvas" width="1000" height="1000" style="background-color:#FFFFFF"></canvas> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment