Skip to content
Kenji Iguchi edited this page May 21, 2013 · 20 revisions

LWF for HTML5

Setup

  1. Move to proper folder.
  2. Clone lwf repository
git clone git@github.com:gree/lwf.git
  1. Clone lwf-demo repository
git clone git@github.com:gree/lwf-demo.git
  1. Set up is completed
MyFolder $: ls
lwf lwf-demo

Convert all Flash contents with latest swf2lwf converter.

  1. Move to "lwf-demo/flash" folder. There are no "*.lwfdata".
MyFolder $: cd lwf-demo/flash/
MyFolder $: ls
batch_convert.sh gree_logo.fla gree_logo.swf
  1. Execute batch convert shell script.
MyFolder $: sh batch_convert.sh
  1. Convert completed. "*.lwfdata" will be generated.
MyFolder $: ls
batch_convert.sh gree_logo.fla gree_logo.swf gree_logo.lwfdata

Open HTML file in browser.

  1. Open Chrome with " --allow-file-access-from-files" option.
  • osx: open -a 'Google Chrome' --args --allow-file-access-from-files
  • win: start chrome --allow-file-access-from-files
NOTE: 
Chrome doesn't allow HTML files to access local files directly without" --allow-file-access-from-files" option.
  1. Open HTML file from "File > Open File..." menu item. For example, open the "lwf-demo/html5/basic/movie_translate.html" file.

Tutorial is completed!

Optional: Launch Web server

  1. Move to top folder.
MyFolder $: ls
lwf lwf-demo
  1. Launch simple HTTP server.
python -m SimpleHTTPServer
  1. Open Chrome. http://0.0.0.0:8000/
NOTE: We recommend you to play examples on Chrome browser.
  1. Open your first example on HTML5. http://0.0.0.0:8000/lwf-demo/html5/basic/movie_translate.html

  2. You can find other examples in http://0.0.0.0:8000/lwf-demo/html5/basic