📄 glllplaylist.as
字号:
event.currentTarget.n.backgroundColor = "0xFFFFFF";
event.currentTarget.n.textColor = "0x000000";
}
function buttonn_mouse_down(event:MouseEvent):void {
event.currentTarget.n.backgroundColor = "0xCC0000";
event.currentTarget.n.textColor = "0xFFFFFF";
var xmax:Number = 0;
if (target.x < xmax) {
target.addEventListener(Event.ENTER_FRAME, easeNX);
}
}
function buttonn_mouse_up(event:MouseEvent):void {
event.currentTarget.n.backgroundColor = "0xFFFFFF";
event.currentTarget.n.textColor = "0xCC0000";
removeEaseNX();
}
function easeX(event:Event):void {
target.x = target.x - 10;
var xmin:Number = 0 - target.width + 330;
if (target.x < xmin) {
target.x = 0 - target.width + 330 - 15;
removeEaseX();
}
}
function removeEaseX():void {
target.removeEventListener(Event.ENTER_FRAME, easeX);
}
function easeNX(event:Event):void {
target.x = target.x + 10;
var xmax:Number = 0;
if (target.x > xmax) {
target.x = 13;
removeEaseNX();
}
}
function removeEaseNX():void {
target.removeEventListener(Event.ENTER_FRAME, easeNX);
}
//构建播放按钮
thisMC.button1.buttonMode = true;
thisMC.button1.gotoAndStop(1);
thisMC.button1.addEventListener(MouseEvent.MOUSE_OVER, button1_mouse_over);
thisMC.button1.addEventListener(MouseEvent.MOUSE_OUT, button1_mouse_out);
thisMC.button1.addEventListener(MouseEvent.MOUSE_DOWN, button1_mouse_down);
function button1_mouse_over(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 0.3;
if ( GlllSound.mySound == null ) {
myTip.showTip("<b> Please select music. </b>", 656, 13, " ");
}
if (GlllSound.mySound != null && event.currentTarget.currentFrame == 1) {
myTip.showTip("<b> stopMusic </b>", 686, 6, " ");
}
if (GlllSound.mySound != null && event.currentTarget.currentFrame == 2) {
myTip.showTip("<b> playMusic </b>", 686, 6, " ");
}
}
function button1_mouse_out(event:MouseEvent):void {
myTip.removeTip();
MovieClip(event.currentTarget).alpha = 1;
}
function button1_mouse_down(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 0.6;
if (GlllSound.mySound != null) {
if (event.currentTarget.currentFrame == 1) {
GlllSound.stopMusic();
event.currentTarget.gotoAndStop(2);
}
else {
GlllSound.playMusic();
event.currentTarget.gotoAndStop(1);
}
}
}
thisMC.button2.buttonMode = true;
thisMC.button2.gotoAndStop(1);
thisMC.button2.addEventListener(MouseEvent.MOUSE_OVER, button2_mouse_over);
thisMC.button2.addEventListener(MouseEvent.MOUSE_OUT, button2_mouse_out);
thisMC.button2.addEventListener(MouseEvent.MOUSE_DOWN, button2_mouse_down);
function button2_mouse_over(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 0.3;
if ( GlllSound.mySound == null ) {
myTip.showTip("<b> Please select music. </b>", 690, 13, " ");
}
if (GlllSound.mySound != null && event.currentTarget.currentFrame == 1) {
myTip.showTip("<b> closeVolume </b>", 720, 6, " ");
}
if (GlllSound.mySound != null && event.currentTarget.currentFrame == 2) {
myTip.showTip("<b> openVolume </b>", 720, 6, " ");
}
}
function button2_mouse_out(event:MouseEvent):void {
myTip.removeTip();
MovieClip(event.currentTarget).alpha = 1;
}
function button2_mouse_down(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 0.6;
if (GlllSound.mySound != null) {
if (event.currentTarget.currentFrame == 1) {
GlllSound.closeVolume();
event.currentTarget.gotoAndStop(2);
}
else {
GlllSound.openVolume();
event.currentTarget.gotoAndStop(1);
}
}
}
thisMC.button3.buttonMode = true;
thisMC.button3.gotoAndStop(1);
thisMC.button3.addEventListener(MouseEvent.MOUSE_OVER, button3_mouse_over);
thisMC.button3.addEventListener(MouseEvent.MOUSE_OUT, button3_mouse_out);
thisMC.button3.addEventListener(MouseEvent.MOUSE_DOWN, button3_mouse_down);
function button3_mouse_over(event:MouseEvent):void {
event.currentTarget.gotoAndStop(2);
if ( GlllSound.mySound == null ) {
myTip.showTip("<b> Please select music. </b>", 706, 13, " ");
}
if (GlllSound.mySound != null ) {
myTip.showTip("<b> closeMusic </b>", 756, 6, " ");
}
}
function button3_mouse_out(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 1;
myTip.removeTip();
event.currentTarget.gotoAndStop(1);
}
function button3_mouse_down(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 0.5;
if (GlllSound.mySound != null) {
GlllSound.closeMusic();
}
}
thisMC.button4.changeVolume.buttonMode = true;
thisMC.button4.changeVolume.gotoAndStop(1);
thisMC.button4.changeVolume.addEventListener(MouseEvent.MOUSE_OVER, button4_mouse_over);
thisMC.button4.changeVolume.addEventListener(MouseEvent.MOUSE_OUT, button4_mouse_out);
thisMC.button4.changeVolume.addEventListener(MouseEvent.MOUSE_DOWN, button4_mouse_down);
thisMC.button4.changeVolume.addEventListener(MouseEvent.MOUSE_UP, button4_mouse_UP);
thisMC.button4.changeVolume.addEventListener(MouseEvent.ROLL_OUT, button4_mouse_ROLL_OUT);
var boundsRect:Rectangle = new Rectangle(0, -1.2, 29, 0);
function button4_mouse_over(event:MouseEvent):void {
event.currentTarget.gotoAndStop(2);
if ( GlllSound.mySound == null ) {
myTip.showTip("<b> Please select music. </b>", 706, 3, " ");
}
if (GlllSound.mySound != null ) {
myTip.showTip("<b> changeVolume </b>", 686, 3, " ");
}
}
function button4_mouse_out(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 1;
myTip.removeTip();
event.currentTarget.gotoAndStop(1);
MovieClip(event.currentTarget).stopDrag();
event.currentTarget.removeEventListener(Event.ENTER_FRAME, changeVolumeHeight);
}
function button4_mouse_UP(event:MouseEvent):void {
MovieClip(event.currentTarget).stopDrag();
event.currentTarget.removeEventListener(Event.ENTER_FRAME, changeVolumeHeight);
myTip.removeTip();
}
function button4_mouse_down(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 0.5;
if (GlllSound.mySound != null) {
MovieClip(event.currentTarget).startDrag(false, boundsRect);
event.currentTarget.addEventListener(Event.ENTER_FRAME, changeVolumeHeight);
}
}
function changeVolumeHeight(e:Event):void {
thisMC.button4.button.width = MovieClip(e.currentTarget).x;
GlllSound.setVolume((MovieClip(e.currentTarget).x) / 29);
myTip.showTip("<b> Volume : " + int((MovieClip(e.currentTarget).x) / 29 * 100).toString() + " </b>", 686, 1, " ");
}
function button4_mouse_ROLL_OUT(e:Event):void {
MovieClip(e.currentTarget).stopDrag();
e.currentTarget.removeEventListener(Event.ENTER_FRAME, changeVolumeHeight);
myTip.removeTip();
}
thisMC.button525.button5a.buttonMode = true;
thisMC.button525.button5a.gotoAndStop(1);
thisMC.button525.button5a.addEventListener(MouseEvent.MOUSE_OVER, button5_mouse_over);
thisMC.button525.button5a.addEventListener(MouseEvent.MOUSE_OUT, button5_mouse_out);
thisMC.button525.button5a.addEventListener(MouseEvent.MOUSE_DOWN, button5_mouse_down);
thisMC.button525.button5a.addEventListener(MouseEvent.MOUSE_UP, button5_mouse_UP);
thisMC.button525.button5a.addEventListener(MouseEvent.ROLL_OUT, button5_mouse_ROLL_OUT);
var boundsRectT:Rectangle = new Rectangle(0, -3, 217, 0);
var musicTime:Number = 0;
function button5_mouse_over(event:MouseEvent):void {
event.currentTarget.gotoAndStop(2);
if ( GlllSound.mySound == null ) {
myTip.showTip("<b> Please select music. </b>", 506, 3, " ");
}
if (GlllSound.mySound != null ) {
myTip.showTip("<b> changeMusicTime </b>", 506, 3, " ");
}
}
function button5_mouse_out(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 1;
myTip.removeTip();
event.currentTarget.removeEventListener(Event.ENTER_FRAME, changeMusicTime);
event.currentTarget.gotoAndStop(1);
MovieClip(event.currentTarget).stopDrag();
}
function button5_mouse_UP(event:MouseEvent):void {
MovieClip(event.currentTarget).stopDrag();
event.currentTarget.removeEventListener(Event.ENTER_FRAME, changeMusicTime);
myTip.removeTip();
musicTime = Number(GlllSound.mySound.bytesTotal) * GlllSound.mySound.length / Number(GlllSound.mySound.bytesLoaded) * MovieClip(event.currentTarget).x / 217;
GlllSound.stopMusic();
GlllSound.playMusicTime(musicTime);
}
function button5_mouse_down(event:MouseEvent):void {
MovieClip(event.currentTarget).alpha = 0.5;
if (GlllSound.mySound != null) {
GlllSound.removeListener();
MovieClip(event.currentTarget).startDrag(false, boundsRectT);
event.currentTarget.addEventListener(Event.ENTER_FRAME, changeMusicTime);
}
}
function changeMusicTime(e:Event):void {
thisMC.button525.button5z1.width = MovieClip(e.currentTarget).x;
myTip.showTip("<b> Time : " + GlllStringUtil.convertMillToTime(Number(GlllSound.mySound.bytesTotal) * GlllSound.mySound.length / Number(GlllSound.mySound.bytesLoaded) * MovieClip(e.currentTarget).x / 217) + " </b>", 506, 1, " ");
}
function button5_mouse_ROLL_OUT(e:Event):void {
MovieClip(e.currentTarget).stopDrag();
e.currentTarget.removeEventListener(Event.ENTER_FRAME, changeMusicTime);
myTip.removeTip();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -