Skip to content

Instantly share code, notes, and snippets.

@scottmessinger
Last active February 3, 2016 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottmessinger/a61723a16d9f7e3a3961 to your computer and use it in GitHub Desktop.
Save scottmessinger/a61723a16d9f7e3a3961 to your computer and use it in GitHub Desktop.
(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;
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!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