代码如下:
stop();
var g_filters:GlowFilter=new GlowFilter(0xFFFFFF,1,3,3,5,BitmapFilterQuality.LOW);
var d_filters:DropShadowFilter = new DropShadowFilter(3, 45, 0x000000, 60, 8, 8);
var url_array:Array =[],btn_array:Array =[],myXML:XML = new XML(),j:uint=0,maskSprite:Sprite=new Sprite(),mySprite:Sprite=new Sprite(),title_txt:TextField=new TextField();
draw(maskSprite);
addChild(maskSprite);
maskSprite.x=stage.stageWidth/2-maskSprite.width/2;
maskSprite.y=stage.stageHeight/2-maskSprite.height/2;
function draw(sprite:Sprite,w:uint=400,h:uint=300 ,bgColor:uint=0xffff00 ):void {
sprite.graphics.beginFill(bgColor);
sprite.graphics.drawRect(0, 0, w, h);
sprite.graphics.endFill();
}
title_txt.;
title_txt.x=150;
title_txt.y=280;
title_txt.autoSize=TextFieldAutoSize.CENTER;
addChild(mySprite);
mySprite.mask=maskSprite;
addChild(title_txt);
var XML_URL:String = "http://sxl001.xfyun.com/xmlImages.xml";
var myXMLURL:URLRequest = new URLRequest(XML_URL);
var myLoader:URLLoader = new URLLoader(myXMLURL);
myLoader.addEventListener("complete", xmlLoaded);
var xmlLong:uint;
function xmlLoaded(event:Event):void {
myXML = XML(myLoader.data);
xmlLong =myXML.child("image").length();
for (var i:uint =0; i
}
event.target.removeEventListener("complete", xmlLoaded);
init();
}
function init() {
var loader:Loader = new Loader();
loader.load(new URLRequest(url_array[j][1]));
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadComplete);
function loadProgress(e:ProgressEvent):void {
var percent:Number=Math.round(e.bytesLoaded/e.bytesTotal*10000)/100;
title_txt.text=url_array[j][0]+" "+percent+" %";
title_txt.filters=[g_filters];
title_txt.mouseEnabled=false;
}
function loadComplete(event:Event):void {
var loadBitmap:Loader=Loader(event.target.loader);
var image:Bitmap=Bitmap(loadBitmap.content);
image.x=j*400;
image.;
image.;
mySprite.addChild(image);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,loadComplete);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, loadProgress);
j++;
if (j
mySprite.y=stage.stageHeight/2-mySprite.height/2;
init();
} else {
title_txt.text=url_array[0][0];
var myBg:bg=new bg();
myBg.x=stage.stageWidth;
myBg.y=stage.stageHeight;
addChild(myBg);
mySprite.x=0;
mySprite.y=stage.stageHeight/2-mySprite.height/2;
for (var i:uint=0; i
myBtn.i=i;
myBtn.t.text=""+uint(i+1);
myBtn.mouseChildren=false;
myBtn.x=stage.stageWidth-myBtn.width*(xmlLong-i);
myBtn.y=stage.stageHeight-myBtn.height;
btn_array.push(myBtn);
addChild(myBtn);
myBtn.addEventListener(MouseEvent.CLICK,onClick);
}
}
}
}
var endX:uint;
function onClick(event:MouseEvent) {
var mc:MovieClip=event.target as MovieClip;
mc.m.gotoAndStop(2);
for (var i:uint=0; i
if (tempBtn!=mc) {
tempBtn.m.gotoAndStop(1);
}
}
endX=int(mc.i)*400;
mySprite.addEventListener(Event.ENTER_FRAME,onMove);
}
function onMove(event:Event) {
var disx:Number =(endX-event.target.x)/12;
event.target.x=disx;
if (Math.abs(event.target.x+endX)<=5) {
event.target.x=-endX;
event.target.removeEventListener(Event.ENTER_FRAME,onMove);
}
}
我的博物馆故事 官方安卓版v1.61.2
我的博物馆故事是一款以消除为主题的经营养成类手游,在这里玩家
专业模拟飞行10 手机版v12.2.4
专业模拟飞行10安卓版是一款飞行休闲手游,顶尖的物理飞行引擎
动物起义战斗模拟器二琳同款 最新版v4.1.1
动物起义战斗模拟器是一个非常有趣的模拟类游戏,玩家可以召唤各
迷你世界七周年 安卓手机版v1.43.0
迷你世界7周年是一款由《迷你世界》官方推出的庆祝特别版本,在
劫后公司无限资源版 v1.0.5.1
劫后公司内置菜单版是游戏的破解版本,在该版本中为玩家提供了内