flashxml.txt

来自「请认真阅读您的文件包然后写出其具体功能(至少要20个字)。尽量不要让站长把时间都」· 文本 代码 · 共 2,207 行 · 第 1/5 页

TXT
2,207
字号
	position=0;
	mysound.stop();
	name_txt.text="stop";
}
next_btn.onRelease=function(){
	if(mid==count) mid=1;
	else mid++;
	soundid(music[mid-1].url,music[mid-1].name);
}
prev_btn.onRelease=function(){
	if(mid==1) mid=count;
	else mid--;
	soundid(music[mid-1].url,music[mid-1].name);
}
pause_btn.onRelease=function(){
	position=mysound.position/1000;
	mysound.stop();
	name_txt.text="pause";
	soundbool=true;
}
this._parent.onEnterFrame=function(){
	var f=(mysound.position/mysound.duration)*100;
	if(isNaN(f)==false){
		this.control_mc.process_mc.proc_mc._xscale=f;
	}
}
b.back_mc是由control_mc和背景组成
c.场景第一帧动作
var fold=1;
function moveclip(speed:Number){
	this.onEnterFrame=function(){
		back_mc._x+=(speed-back_mc._x)/3;
	}
}
back_mc.move_mc.onPress=function(){
	if(fold==1){
		moveclip(0);
	}else{
		moveclip(-180);
	}
	fold=(fold+1)%2;
}
========================================================
function drawRectangle(myMc, width, height, offset)
{
    ();
    ();
    offset;
    myMc;
    offset != NULL ? offset : 0;
    myMc.moveTo(offset != NULL ? offset : 0, offset != NULL ? offset : 0);
    myMc.lineTo(width + (offset != NULL ? offset : 0), offset != NULL ? offset : 0);
    myMc.lineTo(width + (offset != NULL ? offset : 0), height + (offset != NULL ? offset : 0));
    myMc.lineTo(offset != NULL ? offset : 0, height + (offset != NULL ? offset : 0));
    myMc.lineTo(offset != NULL ? offset : 0, offset != NULL ? offset : 0);
    ();
    ();
} // End of the function
function getMp3List(parentmc, label, dataAry, artAry, width, height, fontSize)
{
    ();
    ();
    ();
    player.maxIndex = Math.min(label.length - 1, dataAry.length - 1);
    player.dataAry = dataAry;
    player.labelAry = label;
    var mc = parentmc.createEmptyMovieClip("mc", 1);
    var shapeHeight = 18;
    var padding = 2;
    var borderWidth = 1;
    var scrollWidth = 11;
    var shapeWidth = width - borderWidth - padding * 3 - scrollWidth;
    var clientHeight = shapeHeight * label.length;
    var border = mc.createEmptyMovieClip("border", 100);
    border.lineStyle(1, 6710886);
    drawRectangle(border, width, height, padding * -1 - borderWidth);
    var background = mc.createEmptyMovieClip("background", -100);
    background.beginFill(16777215, 90);
    drawRectangle(background, width, height, padding * -1 - borderWidth);
    var sList = mc.createEmptyMovieClip("sList", 10);
    0;
    while (label.length > 0)
    {
        sList.createEmptyMovieClip("l" + 0, 0);
        sList.createEmptyMovieClip("l" + 0, 0).createTextField("label", 1, 0, 0, 100, shapeHeight);
        sList.createEmptyMovieClip("l" + 0, 0).label.autoSize = false;
        sList.createEmptyMovieClip("l" + 0, 0).label._width = width - padding * 2 - borderWidth * 2 - scrollWidth;
        sList.createEmptyMovieClip("l" + 0, 0).label.selectable = false;
        sList.createEmptyMovieClip("l" + 0, 0)._y = shapeHeight * 0;
        sList.createEmptyMovieClip("l" + 0, 0).index = 0;
        sList.createEmptyMovieClip("l" + 0, 0).label.text = label[0] + artary[0];
        new TextFormat();
        new TextFormat().font = "Tahoma";
        new TextFormat().size = size;
        sList.createEmptyMovieClip("l" + 0, 0).label.setTextFormat(new TextFormat());
        (sList.createEmptyMovieClip("l" + 0, 0));
        function ()
        {
            (0, sList.createEmptyMovieClip("l" + 0, 0));
            this;
            getTimer();
            this.clicked = getTimer();
            this.clicked = getTimer();
            getTimer() - this.clicked >= 500 ? "" : false;
            true;
            (0, getTimer() - this.clicked >= 500 ? "" : false);
            return(getTimer() - this.clicked >= 500 ? "" : false);
        } // End of the function
        doubleClick[function ()] = sList.createEmptyMovieClip("l" + 0, 0);
        (0);
        0.onPress = function ()
        {
            (0);
            (_quality - parentmc._y - mp3list.mc.sList._y) / shapeHeight | 0;
            if (this.doubleClick())
            {
                player.select((_quality - parentmc._y - mp3list.mc.sList._y) / shapeHeight | 0);
                shape._y = ((_quality - parentmc._y - mp3list.mc.sList._y) / shapeHeight | 0) * shapeHeight;
            } // end if
            focusShape._y = ((_quality - parentmc._y - mp3list.mc.sList._y) / shapeHeight | 0) * shapeHeight;
            (0);
        } // End of the function
        true++;
    } // end while
    var shape = sList.createEmptyMovieClip("shape", -1);
    shape.beginFill(65280, 30);
    drawRectangle(shape, shapeWidth, shapeHeight);
    var hintShape = sList.createEmptyMovieClip("hintShape", -2);
    hintShape.beginFill(65280, 10);
    drawRectangle(hintShape, shapeWidth, shapeHeight);
    var focusShape = sList.createEmptyMovieClip("focusShape", -3);
    focusShape.lineStyle(1, 65280, 50);
    drawRectangle(focusShape, shapeWidth - 1, shapeHeight - 1);
    mc.onMouseMove = function ()
    {
        updateAfterEvent();
        hintShape._y = Math.max(0, Math.min(_quality - shapeHeight / 2 - parentmc._y, height - padding - borderWidth - shapeHeight) - (sList._y | 0));
    } // End of the function
    var myMask = mc.createEmptyMovieClip("myMask", 99);
    myMask.beginFill(0, 100);
    drawRectangle(myMask, width - borderWidth - scrollWidth, height - borderWidth - padding * 2, 0);
    sList.setMask(myMask);
    var scrollbar = mc.createEmptyMovieClip("scrollbar", 97);
    scrollbar.beginFill(16382457);
    drawRectangle(scrollbar, scrollWidth, height - padding * 2 - borderWidth, 0);
    var scrollbarBorder = scrollbar.createEmptyMovieClip("scrollbarBorder", 1);
    scrollbarBorder.lineStyle(1, 14935011);
    drawRectangle(scrollbarBorder, scrollWidth - 1, height - padding * 2 - borderWidth - 1, 0);
    var scrollbutton = scrollbar.createEmptyMovieClip("scrollbutton", 2);
    scrollbutton.beginFill(10066329);
    drawRectangle(scrollbutton, scrollbar._width - 5, 18, 2);
    scrollbar._x = width - scrollWidth - padding * 2 - borderWidth;
    scrollbar.onPress = function ()
    {
        this.button1 = true;
    } // End of the function
    scrollbar.onMouseUp = function ()
    {
        this.button1 = false;
    } // End of the function
    scrollbar.maxY = scrollbar._height - scrollbutton._height - 5;
    scrollbar.onMouseMove = function ()
    {
        if (this.button1)
        {
            scrollbutton._y = Math.max(0, Math.min(_quality - parentmc._y - scrollbutton._height / 2 - 2, this.maxY));
            sList._y = Math.max(scrollbutton._y * clientHeight / (scrollbar._height - scrollbutton._height) * -1 | 0, myMask._height - clientHeight);
        } // End of the function
    } // end if
    (sList.createEmptyMovieClip("l" + 0, 0));
    ();
    ();
} // End of the function
function fixSemiTime(time)
{
    ();
    time;
    (time);
    "";
    time >= 10 ? time : "0" + time;
    ("");
    return("");
} // End of the function
function formatTime(time)
{
    var s = "";
    return(fixSemiTime(time / 60 | 0) + ":" + fixSemiTime(time % 60 | 0));
} // End of the function
function hint(obj, hintStr)
{
    (time >= 10 ? time : "0" + time);
    obj;
    (obj);
    obj.onRollOver = function ()
    {
        LCD.hintText._visible = true;
        LCD.hintText.text = hintStr;
        LCD.main.mainText._visible = false;
    } // End of the function
    obj.onRollOut = function ()
    {
        LCD.hintText._visible = false;
        LCD.hintText.text = "";
        LCD.main.mainText._visible = true;
    } // End of the function
    obj.onReleaseOutside = function ()
    {
        LCD.hintText._visible = false;
        LCD.hintText.text = "";
        LCD.main.mainText._visible = true;
    } // End of the function
    (time >= 10 ? time : "0" + time);
} // End of the function
Stage.scaleMode = "noScale";
_focusrect = "low"
var player = {};
player.selectedIndex = -1;
player.maxIndex = -1;
player.selectedItem = {};
player.subject = "";
player.mode = 0;
player.volumeValue = 70;
player.panValue = 0;
player.stoped = true;
player.main.mainText = "";
function (index)
{
    mp3list.mc.sList.shape._y = index * 18 + mp3list.mc.sList._y;
    player.selectedIndex = index;
    player.selectedItem = eval("mp3list.mc.sList.l" + index);
    player.subject = player.labelAry[index];
    player.artist = player.artAry[index];
    LCD.main.mainText.text = player.subject + "(Artist:" + player.artist + ")";
    mySound.isLoaded = false;
    mySound.preloadDuration = 0;
    mySound.start(0);
    mySound.stop();
    mySound.loadSound(player.dataAry[index], true);
    mySound.setVolume(player.volumeValue);
    mySound.start(0);
    LCD.stop._visible = false;
    LCD.pause._visible = false;
    LCD.play._visible = true;
    player.select = function (index)
    {
        LCD.time.text = formatTime(mySound.position / 1000 | 0);
    } // End of the function
    setInterval(function (), 500);
} // End of the function
player.setDefault = function ()
{
    with (LCD)
    {
        pause._visible = false;
        play._visible = false;
        stop._visible = true;
        main.mainText.text = "";
    } // End of with
    mySound.isLoaded = false;
    progressbar.preloadBar._x = -147;
    progressbar.loadBar._x = -147;
    progressbar.semiBar._x = -147;
} // End of the function
var cbackground = copyright.createEmptyMovieClip("hintShape", 1);
cbackground.beginFill(16777215, 90);
drawRectangle(cbackground, 159, 99, -5);
var cborder = cbackground.createEmptyMovieClip("focusShape", 1);
cborder.lineStyle(1, 0, 50);
drawRectangle(cborder, 158, 98, -5);
cbackground.onPress = function ()
{
    return(false);
} // End of the function
cbackground.useHandCursor = false;
var rightText = copyright.createTextField("rightText", 2, 0, -2, 153, 95);
copyright.rightText.html = true;
copyright.rightText.selectable = false;
copyright.rightText.htmlText = "<b><font color=\"#ff0000\">L3X MP3Player</font></b><br/>" + new Array(49).join("-") + "<br/>Version: 0.9B (0.9.0116)<br/>Author: <u><a href=\"http://lexrus.blueidea.com/\" target=\"_blank\"><font color=\"#0066cc\">LeXRus</font></a></u>" + "<br/>Publish Date: 1-16-2004<br/>" + new Array(49).join("-") + "<br/>Special thanks to<br/><u><a href=\"http://www.myhyli.com/\" target=\"_blank\"><font color=\"#0066cc\">Myhyli</font></a></u>, <u><a href=\"http://script.digichina.net/\" target=\"_blank\"><font color=\"#0066cc\">Egg(darkvn)</font></a></u>, and <u><a href=\"http://www.blueidea.com/\" target=\"_blank\"><font color=\"#0066cc\">Blueidea</font></a></u>";
var fmt = new TextFormat();
fmt.font = "Tahoma";
fmt.size = 10;
copyright.rightText.setTextFormat(fmt);
var mdown = false;
var xwidth = volume._width - volume.dot._width;
this.volume.onPress = function ()
{
    mdown = true;
} // End of the function
this.volume.onMouseUp = function ()
{
    mdown = false;
} // End of the function
this.volume.onMouseMove = function ()
{
    ();
    (time >= 10 ? time : "0" + time);
    if (mdown)
    {
        updateAfterEvent();
        _soundbuftime - volume._x;
        8;
        volume.dot._x = Math.max(8, Math.min(_soundbuftime - volume._x, xwidth) - 1) - 3;
        player.volumeValue = ((volume.dot._x - 1) / (volume._width - 8 - volume.dot._width - 1) * 100 | 0) - 5;
        mySound.setVolume(player.volumeValue);
        LCD.hintText.text = "Volume: " + player.volumeValue + "%";
        if (player.volumeValue == 0)
        {
            LCD.speaker._visible = false;
        }
        else if (player.volumeValue == 100)
        {
            LCD.max._visible = true;
        }
        else
        {
            LCD.speaker._visible = true;
            LCD.max._visible = false;
        } // end if
        LCD.volumeLeft._width = player.volumeValue / 100 * 20;
        LCD.volumeLeft._x = 120 - player.volumeValue / 100 * 20;
        LCD.volumeRight._width = player.volumeValue / 100 * 20;
    } // end if
    ();
    (time >= 10 ? time : "0" + time);
} // End of the function
this.pan.maxX = 70;
this.pan.offsetX = pan._x;
this.pan.dot._width = 18;
this.pan.dotWidth = 14;
this.pan.dot._x = pan.maxX / 2 + pan.dotWidth / 1.700000;
this.pan.onPress = function ()
{
    this.mdown = true;
} // End of the function
this.pan.onMouseUp = function ()
{
    this.mdown = false;
} // End of the function
this.pan.onMouseMove = function ()
{
    if (this.mdown)
    {
        updateAfterEvent();
        pan.dot._x = Math.max(0, Math.min(_soundbuftime - pan.offsetX + pan.dotWidth / 2, pan.maxX)) + pan.dotWidth / 2;
        player.panValue = (pan.dot._x - pan.dotWidth / 2) / (pan.maxX - pan.dotWidth / 3 + 4.500000) * 200 - 100 | 0;
        if (player.panValue < -15 && player.panValue < 15)
        {
            player.panValue = 0;
            pan.dot._x = pan.maxX / 2 + pan.dotWidth / 1.700000;
        } // end if
        LCD.hintText.text = "Balance: " + player.panValue;
        mySound.setPan(player.panValue);
        LCD.pan._x = 110 + player.panValue / 100 * 10;
    } // End of the function
} // end if
var myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (succ)
{
    (sList.createEmptyMovieClip("l" + 0, 0));
    ();
    (time >= 10 ? time : "0" + time);
    if (succ)
    {
        LCD.main.mainText.text = "Play List Loaded. Enjoy the Music.";
        this.firstChild.childNodes;
        var labelary = [];
        var dataary = [];
        var artary = [];
        0;
        while (this.firstChild.childNodes.length > 0)
        {
            labelary[labelary.length] = this.firstChild.childNodes[0].attributes.n;
            dataary[dataary.length] = this.firstChild.childNodes[0].attributes.f;
            (this.firstChild.childNodes[0].attributes.a);
            this.firstChild.childNodes[0].attributes.a != "" ? " - " + this.firstChild.childNodes[0].attributes.a : "";
            artary[artary.length] = this.firstChild.childNodes[0].attributes.a != "" ? " - " + this.firstChild.childNodes[0].attributes.a : "";
            0++;
        } // end while
        player.artAry = artary;
        getMp3List(mp3list, labelary, dataary, artary, 158, 98, 12);
    }
    else
    {
        LCD.hintText.text = "NO POWER";
    } // end if
    (sList.createEmptyMovieClip("l" + 0, 0));
    ();
    (time >= 10 ? time : "0" + time);
} // End of the function
var mySound = new Sound();
mySound.isLoaded = false;
mySound.onLoad = function (succ)
{
    if (succ)
    {
        mySound.isLoaded = true;
        player.timeNum = mySound.duration;
        if (player.timeNum | false)
        {
            LCD.timeNum.num.text = formatTime(player.timeNum / 1000);
        }
        else
        {
            LCD.timeNum.num.text = "N/A.";
        } // End of the function
    } // end if
} // end if
mySound.currentPosition = 0;
mySound.onSoundComplete = function ()
{
    if (player.maxIndex == player.selectedIndex)
    {
        if (player.mode == 0)
        {
            player.setDefault();
        }
        else if (player.mode == 1)
        {
            player.select(0);
        }
        else
        {
            player.select(player.selectedIndex);
        } // end if
    }
    else if (player.mode == 2)
    {
        player.select(player.selectedIndex);
    }
    else
    {
        player.select(player.selectedIndex + 1);
    } // End of the function
} // end if
mySound.onID3 = function ()
{
    (sList.createEmptyMovieClip("l" + 0, 0));
    ();
    (time >= 10 ? time : "0" + time);
    if (mySound.id3.TYER | false)
    {

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?