Fanvas是一个把swf转为html5 canvas动画的系统
代码摘要
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--<meta name="viewport" content="width=device-width, user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1" />-->
<title>Fanvas Demo</title>
<!-- Note: All core fanvas classes are listed here: -->
[removed][removed]
[removed][removed]
[removed]
function init() {
setTimeout(function(){
var canvas = document.getElementById("testCanvas");
// alert(window.innerWidth + ' ' + window.innerHeight);
// swfData.frameRate = 12;
canvas.style.width = window.innerWidth + 'px'; //css控制最终实际显示的尺寸
canvas.style.height = window.innerHeight + 'px';
fanvas.play("testCanvas", swfData, {
cache: 2, autoPlay: true,
onFrame: function (index) {
1