View Full Version : HTML5 and Javascript

11-27-2012, 09:23 PM
When I export flash animation with CreateJS, a text block looks like this:

(lib._3partenergyreductionapproach = function() {

// Isolation Mode
this.title4_txt = new Text("The 3-part Energy Reduction Approach", "33px SEOptimistBlack", "#ffffff");
this.title4_txt.textAlign = "center";
this.title4_txt.textBaseline = "top";
this.title4_txt.lineHeight = 37.1;
this.title4_txt.lineWidth = 652;

}).prototype = p = new Container();
p.nominalBounds = new Rectangle(-318.9,-19.7,651.6,74.1);

How do I reference typeface.js in this block so it refers to the embedded library? Because the call out in the above script just defaults to a system font if its not present on the users device.

Here is the html:

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CreateJS export from SE_Start.fla</title>

<script src="libs/easeljs-0.4.2.min.js"></script>
<script src="libs/tweenjs-0.2.0.min.js"></script>
<script src="libs/movieclip-0.4.1.min.js"></script>
<script src="libs/preloadjs-0.1.0.min.js"></script>
<script src="SE_Start.js"></script>
<script src="SE_Interact.js"></script>
<script src="libs/typeface-0.15.js"></script>
<script src="libs/seoptimistblack_typeface.js"></script>

<script type="text/javascript">
if((navigator.userAgent.match(/iPhone/i)) ||
(navigator.userAgent.match(/iPod/i))) {
if (document.cookie.indexOf("iphone_redirect=false") == -1) window.location = "http://www.ravestudio.com/";


<body onload="init();" style="background-color:#ffffff">
<canvas id="canvas" width="1024" height="768" style="background-color:#ffffff"></canvas>