Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (26 sloc) 983 Bytes
<!doctype html>
<script src="burst-core.closure.js"></script>
<script>
function loaded(){
var redBox = document.getElementById('redBox');
var greenBox = document.getElementById('greenBox');
burst
.timeline('myTimeline',1,100,1,false,function(){
burst.timeline('myTimeline').speed = burst.timeline('myTimeline').speed > 0 ? -1 : 1 ;
burst.load('myTimeline');
})
.track('bounceRight',redBox.style,'left')
.key(1,0,'inOutBounce')
.key(100,100)
.track('slideRight',greenBox.style,'left')
.key(1,0,'linear')
.key(100,100)
;
burst.load('myTimeline');
//burst.frame(25);
burst.play();
};
addEventListener('DOMContentLoaded', function(){ loaded(); }, false);
</script>
<div id="redBox" style="background:red;position:absolute;left:0px;top:0px;width:50px;height:50px"></div>
<div id="greenBox" style="background:limegreen;position:absolute;left:0px;top:50px;width:50px;height:50px"></div>