Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript (http://www.flasher.ru/forum/forumdisplay.php?f=5)
-   -   Помогите с кодом !!((( (http://www.flasher.ru/forum/showthread.php?t=51568)

Pavel_lis 17.11.2003 18:54

Помогите с кодом !!(((
 
Вложений: 1
Это код который я пишу в первом кадре предлоадера,
все нормально но почему-то не исчезает шкала построеная
в _root.createEmptyMovieClip("myClip", 1);
помогите новичку, как спрограммить...
можно посмотреть как и что в прилож.файле....


_root.stop();
_root.onEnterFrame = function() {

if (this.getBytesLoaded() == this.getBytesTotal())
{
delete this.onEnterFrame;
this.info_txt.removeTextField();
this.play();
} else {

_root.createEmptyMovieClip("myClip", 1);
with (_root.myClip)
{
_root.myClip._alpha = 0;
this.moveTo(200, 175);
this.lineStyle(4, 0x666666);
this.lineTo(300, 175);
this.moveTo(200, 175);
this.lineStyle(2, 0xffffff);
this.lineTo(percent+200, 175);
}
percent = Math.round(this.getBytesLoaded()/this.getBytesTotal()*100);


var info_str = " loaded - "+percent+" %";
this.createTextField("info_txt", 1, 230, 180, 0, 0);
this.info_txt.autoSize = "left";

this.info_txt.text = info_str;
}
};

Nox Noctis 17.11.2003 20:16

Код:

this.createTextField("info_txt", 2, 230, 180, 0, 0);
info_txt.autoSize = true;
this.createEmptyMovieClip("myClip", 1);
tellTarget (myClip) {
        moveTo(200, 175);
        lineStyle(4, 0x666666);
        lineTo(300, 175);
        //
        moveTo(200, 175);
        lineStyle(2, 0xffffff);
        lineTo(percent+200, 175);
}
_root.onEnterFrame = function() {
        var l = this.getBytesLoaded();
        var t = this.getBytesTotal();
        var percent = Math.round(l/t*100);
        this.myClip._xscale = l/t*100;
        this.info_txt.text = "Загружено: - "+percent+" %";
        if (l && t && l>=t) {
                delete this.onEnterFrame;
                this.info_txt.removeTextField();
                removeMovieClip(this.myClip);
                this.play();
        }
};
stop();

а так ? :)


Часовой пояс GMT +4, время: 11:37.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.