发新话题
打印

[编程] 在线等,,求解释代码

在线等,,求解释代码

_root.back._visible = false;
_root.container2.unloadMovie();
var efn = 0;
var scroll_count = 0;
_root.visual.img_container.unloadMovie();
clearInterval(gentleman);
for (i = 1; i - 1 < 20; i++)
{
    _root["teaser" + i].unloadMovie();
} // end of for
//------------------------------------------------------------------------------------//
_root.text_mask.onEnterFrame = function ()
{
    if (_root.text_mask._currentframe == 20)
    {
        i = 1;
        gentleman = setInterval(function ()
        {
            duplicateMovieClip(_root.teaser, "teaser" + i, "40" + i);
            _root["teaser" + i].id = i;
            _root["teaser" + i].enabled = false;
            _root["teaser" + i].onPress = function ()
            {
                _root.scroll_count = 0;
                _root.back._visible = true;
                _root.back.gotoAndStop(1);
                _root.hl_illustration.gotoAndStop(2);
                _root.visual.loader.gotoAndPlay(2);
                _root.overview.overview_container.unloadMovie();
                _root.overview_mirror.overview_container.unloadMovie();
                for (i = 0; i < 20; i++)
                {
                    _root["teaser" + i].gotoAndPlay(14);
                    _root["teaser" + i].enabled = true;
                } // end of for
                i = this.id;
                this.gotoAndPlay(26);
                _root.enlarge.gotoAndPlay(2);
                this.enabled = false;
                _root.visual.img_container.loadMovie("images/illustration/medium/medium_" + this.id + ".jpg");
                _root.mirror.img_container.loadMovie("images/illustration/medium/medium_" + this.id + ".jpg");
                _root.loadVariables("text/gallerie/illustration/project_info_" + this.id + ".html", "");
                _root.scroll_count = 0;
                _root.context.scroll = 0;
                _root.enlarger.enabled = true;
                _root.enlarger.gotoAndStop(2);
                _root.enlarger.onPress = function ()
                {
                    getURL("javascript:show(\'images/illustration/large/large_" + i + ".jpg\', \'Illustration " + i + "\', \'single\', \'large\');", "");
                    _root.enlarge.gotoAndStop(1);
                };
            };
            _root["teaser" + i].combo.container_teaser.loadMovie("images/illustration/thumbnails/thumbnail_" + i + ".jpg");
            _root["teaser" + i]._x = 997 - i++ * 45;
            if (i == 18)
            {
                for (i = 0; i < 20; i++)
                {
                    _root["teaser" + i].enabled = true;
                } // end of for
                clearInterval(gentleman);
            } // end if
        }, 200);
        delete this.onEnterFrame;
    } // end if
};

TOP

上面这段代码现在是读取同一文件夹内的图片信息。

现在我想把它改成根据点击指定按钮去读取数据库里图片的信息,

但是代码我理解不过来,不知道应该怎么写,小女子在此谢过各位高手了,

请大家走过路过,帮忙看看,帮忙理解下,,,谢谢

[ 本帖最后由 ccinclude 于 2008-4-12 17:51 编辑 ]

TOP

读取数据库,要用到其它程序语言,FLASH不能直接读

TOP

这个我知道。。我只是想在我获得PHP传过来的数据时,循环显示时要用到这个代码,

但是不知道这个循环要怎么写。。。

怎么才能用好这个代码

TOP

// end of for  // end if 通常只有反编译软件搞出来的代码才会搞这种注释。
循环获得变量可以用for  ,但通常都是后台程序生成XML与FLASH沟通。

TOP

是我们做设计同事找到,反编译出来的。。

后台连接是没问题了,,主要就是前台显示的问题,也就是这句话的问题
比如说,
for(i=0;i<后台记录总数;i++){
这里面循环显示显示所有数据。。。

}

TOP

发新话题