import mx.controls.Alert;
var listenerObj:Object = new Object();
Alert.show("我是龙女 QQ252828986 常不在线^O^", "欢迎光临!", Alert.OK | Alert.CANCEL, this, listenerObj);
stop(); //----------实现听网上歌的代码-----
LongLu = new Sound();
al=random(9)+1
LongLu.loadSound("
http://music.nx.cninfo.net/mp3/liury_0"+al+".mp3'''' target="_blank" >
http://music.nx.cninfo.net/mp3/liury_0"+al+".mp3", true);
LongLu.start(0, 999);
//----------画舞台的代码---------------
var sceneWidth =550;//场景的宽
var sceneHeight=300;//场景的高
var sideDisWidth = Stage.width/2-sceneWidth/2;//定义变量
var sideDisHeight = Stage.height/2-sceneHeight/2;//定义变量
var time = new Date();//建一个新的时间对象
var month=time.getMonth()+1;
_root.createEmptyMovieClip("masker", -2);//创建空影片剪辑masker,层深-2.定义场景的样式
with (masker) {//设置masker这个空MC的动作。画场景边框及填充色.
lineStyle(1, 0x999999, 100);//线条颜色
beginFill(0xcccccc, 30);//绘制矩形闭合路径,并填充灰色,透明度为100.
moveTo(sideDisWidth, sideDisHeight);//绘制起点
lineTo(sideDisWidth+sceneWidth, sideDisHeight);//绘制的右上角点的位置
lineTo(sideDisWidth+sceneWidth, sideDisHeight+sceneHeight);//绘制的右下角点的位置
lineTo(sideDisWidth, sideDisHeight+sceneHeight);//绘制的左下角点的位置
lineTo(sideDisWidth, sideDisHeight);//绘制的左上角点的位置
endFill();//结束绘制
} //------------签名的代码--------------
_root.createEmptyMovieClip("myMC", 10);//创建作为现有影片剪辑子级的空影片剪辑myMC,层深10
with (myMC) {//影片剪辑myMC的属性
var infor:TextField = myMC.createTextField("infor", 1, sideDisWidth+sceneWidth-100, sideDisHeight+sceneHeight, 100, 20);//创建文本字段并附给infor
infor.autoSize="right";//文本字段的自动大小调整和对齐
infor.selectable=false;//文本字段是否可编辑。false为不可编辑
infor.textColor = 0x999999;//文本颜色
infor.text ="龙女习作 "+time.getFullYear()+"年"+month+"月"+time.getDate()+"日 ";//文本为"龙女 "
}.
即然是写教程,肯定也会发现以前的问题,又整理了一下原文件,进行了一些改动.能网上听歌了,在看这个习作的同样也不会无聊哦.能够随机听到9首歌.好,把修改后的文件上传.