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) {
// console.log("onFrame", index);
// if(index == 3){
// fanvas.pause("testCanvas");
// setTimeout(function(){
// fanvas.resume("testCanvas");
// fanvas.replay("testCanvas");
// }, 2000);
// }
},
//showFPS: 1,
scale: 1,
//clearAll: 1,
//showDirtyRect: 1,
imagePath: "./img/"
});
}, 100);
}