var H = window.screen.height ;//手机分辨率高度
var W = window.screen.width;//手机分辨率宽度
//相对分辨率高度比例
var ratioH = H / 800;
//相对分辨率宽度比例
var ratioW = W / 480;
document.getElementById("mylegend").style.width = W + "px";//画布的宽度
document.getElementById("mylegend").style.height = H + "px";//画布的高度
document.getElementById("mylegend").style.backgroundColor = "#cccccc";//画布颜色
init(40,"mylegend",W,H,main);
var layer_yi = new LSprite();//第一层容器
var layer_er = new LSprite();//第二层容器
function main(){ //启动函数
addChild(layer_yi); //包含第一层容器
addChild(layer_er); //包含第二层容器
the_first_layer_background();//加载第一层背景图片
}
var loader_the_first_layer_background;//加载背景图片
var bitmapdata_the_first_layer_background;//用于保存背景图片
var bitmap_the_first_layer_background;//用于显示背景图片
var timing_for_3_seconds ;
var loader_turntable_image;
var bitmapdata_turntable_image;
var bitmap_turntable_image;
var sound;//音乐加载
//第一张背景图片*---------*用于后台加载所有的音乐和图片
function the_first_layer_background(){
loader_the_first_layer_background = new LLoader();
loader_the_first_layer_background.addEventListener(LEvent.COMPLETE,loadBitmapdata_the_first_layer_background);
loader_the_first_layer_background.load("images/the_first_layer_background_image.png","bitmapData");
}
function loadBitmapdata_the_first_layer_background(event){
bitmapdata_the_first_layer_background = new LBitmapData(loader_the_first_layer_background.content,0,0,480,800);
bitmap_the_first_layer_background = new LBitmap(bitmapdata_the_first_layer_background);
bitmap_the_first_layer_background.scaleX = ratioW;
bitmap_the_first_layer_background.scaleY = ratioH;
layer_yi.addChild(bitmap_the_first_layer_background);