Jump to content
GreenSock

squashthatfly

Members
  • Posts

    2
  • Joined

  • Last visited

squashthatfly's Achievements

0

Reputation

  1. Hi Thank you for your help. It works now. One problem I am having now is using sprite sheets to bring my file size down. Apparently its too big (500kb) I know sprite sheets are supposed to bring down file size etc. My problem is when I publish from Flash CC using a sprite sheet the banner HTML file only displays a blank white box now. Here is my HTML code <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Wickes HTML5 Test</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="http://code.createjs.com/preloadjs-0.6.1.min.js"></script> <script src="Wickes HTML5 Test.js"></script> <script> var canvas, stage, exportRoot; function init() { canvas = document.getElementById("canvas"); images = images||{}; ss = ss||{}; var loader = new createjs.LoadQueue(false); loader.addEventListener("fileload", handleFileLoad); loader.addEventListener("complete", handleComplete); loader.loadFile({src:"images/Wickes HTML5 Test_atlas_.json", type:"spritesheet", id:"Wickes HTML5 Test_atlas_"}, true); loader.loadManifest(lib.properties.manifest); } function handleFileLoad(evt) { if (evt.item.type == "image") { images[evt.item.id] = evt.result; } } function handleComplete(evt) { var queue = evt.target; ss["Wickes HTML5 Test_atlas_"] = queue.getResult("Wickes HTML5 Test_atlas_"); exportRoot = new lib.WickesHTML5Test(); stage = new createjs.Stage(canvas); stage.addChild(exportRoot); stage.update(); stage.enableMouseOver(); createjs.Ticker.setFPS(lib.properties.fps); createjs.Ticker.addEventListener("tick", stage); } </script> </head> <body onload="init();" style="background-color:#D4D4D4"> <canvas id="canvas" width="320" height="50" style="background-color:#FFFFFF"></canvas> </body> </html> My Sprite sheet is called: Wickes HTML5 Test_atlas_.png Any help would be appreciated Thank you
  2. Hi There I have been reading this thread and it seems like you guys know what you're doing. Ive recently been told my flash banners need to be converted to HTML5. I have done this using flash CC HTML5 canvas. I don't know what I have done wrong but I can't seem to get a clicktag to work through the Javascript. The media company have told me the clicktag needs to be in the HTML I think my clicktag is going in the JS file as I am adding the clicktag to the actions within my flash file. Is this the right way to go about it or is there a better way to do it. I'll admit I don't code I know very little about it and I don't know flash extensively. These banners just appeared at work and I was fine updating them in flash as SWF files but converting and sorting out the coding has really stumped me. Any help would be appreciated Thank you Darren
×