Skip to content

Instantly share code, notes, and snippets.

@kled
kled / gist:1993402
Created March 7, 2012 14:20
HTML5:easeljs
<!DOCTYPE html>
<html>
<head>
<title>Creative JS</title>
<script src="creativejslibs/easel.js"></script>
<script src="creativejslibs/tween.js"></script>
<script>
var canvas;
var stage;
function init ( ) {
@kled
kled / gist:1993410
Created March 7, 2012 14:22
HTML5:easeljs Text
// Create a new Text object, and position it on stage:
var txt = new Text("text on the canvas.", "36px Arial", "#FFF");
txt.textBaseline = "top"; // draw text relative to the top of the em box.
txt.x = 100;
txt.y = 80;
txt.rotation = 20;
//txt.outline = true;
stage.addChild(txt);
@kled
kled / gist:1993927
Created March 7, 2012 15:53
HTML5:Creative JS startup
<!DOCTYPE html>
<html>
<head>
<title>Creative JS</title>
<script src="creativejslibs/easel.js"></script>
<script src="creativejslibs/tween.js"></script>
<script>
var canvas;
var stage;
function init () {
@kled
kled / gist:1993966
Created March 7, 2012 16:00
JavaScript:SWFObject-Embed facebook Application
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<style type="text/css">
#flashContent{
@kled
kled / gist:1994059
Created March 7, 2012 16:11
JQuery: start Page
<!DOCTYPE html>
<html>
<head>
<title>index</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
});
@kled
kled / gist:2001439
Created March 8, 2012 15:12 — forked from codemasta92/gist:1555328
HTML5 : Easel JS Button
(function(k) {
var Button = function(a, x, y) {
this.initialize(a,x,y)
},p = Button.prototype = new DisplayObject;
p.left = 0;
p.top = 0;
p.ypos = 0;
p.image = null;
p.snapToPixel = true;