Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   Не работает стоп, код его игнорирует. (http://www.flasher.ru/forum/showthread.php?t=147006)

sestem 24.11.2010 01:27

Не работает стоп, код его игнорирует.
 
Здраствуйте, я тут игру делаю.
уже разпределил по отдельным as
в главном fla лежит
Код AS1/AS2:

stop();
#include "includes/1.as";
#include "includes/2.as";
#include "includes/3.as";
#include "includes/4.as";
#include "includes/5.as";
#include "includes/6.as";
#include "includes/7.as";
#include "includes/8.as";

в остальных кучу кодов


1 as
Код AS1/AS2:

stop();// На всякий случай

2 as

Код AS1/AS2:

zombi_health = 100;
AK47 = 1;
Fort15 = 1;
graneade = 1;
speedZOMBI = 7;
point = 0;
health = 100;
speed = 25;
healthkrica = 10;
armor = 0;
money = 0;
Goldmoney = 0;
level = 0;
opit = 0;

3 as

Код AS1/AS2:

_root.onEnterFrame = function() {
        HealthBar.text = health;
        pointBar.text = point;
        armorBar.text = armor;
        levelBar.text = level;
        opitBar.text = opit;
        moneyBar.text = money;
        GoldmoneyBar.text = Goldmoney;

4 as

Код AS1/AS2:

if (Key.isDown(Key.UP)) {
 
 
                camera.mc1.gotoAndStop(47);
                camera.mc1.deagle.gotoAndStop(2);
                camera.mc1.deagle.pulya._x-=300
 
        }
        if(Key.isDown(Key.DOWN)) {
 
                camera.mc1.gotoAndStop(48);
                camera.mc1.deagle.gotoAndStop(2);}
                camera.mc1.deagle.pulya._x+=300;
    if(camera.mc1.deagle.pulya.hitTest(camera.zombi)){
                zombi_health-=50;
                camera.mc1.deagle.gotoAndStop(1);
        }
        if (Key.isDown(Key.LEFT)) {
                camera.mc1.gotoAndPlay(21);
                camera.mc1._x -= speed;
                camera._x += speed;
        } else {
                if (Key.isDown(Key.RIGHT)) {
                        camera.mc1._x += speed;
                        camera.mc1.gotoAndPlay(12);
                        camera._x -= speed;
                }
        }

5 as

Код AS1/AS2:

if (camera.mc1.hitTest(camera.kol)) {
        speed = 8.99;
        health -= 5;
} else {
        health = health;
}
if (camera.mc1.gravitation.hitTest(camera.gravitation)) {
        speed = speed;
} else {
        camera.mc1._y += 24;
}
if (camera.mc1.gravitation.hitTest(camera.gravitation)) {
        speed = speed;
} else {
        camera.mc1._y += 24;
}
if (camera.mc1.hitTest(camera.sharik)) {
        opit += 20;
        point += 1;
        armor = 100;
        money += 10;
}
if (camera.mc1.hitTest(camera.zombi)) {
        health -= 1;
}
if (camera.zombi.hitTest(camera.gravitation)) {
        speedZOMBI = speedZOMBI;
} else {
        camera.zombi._y += 24;
}
if (camera.zombi.hitTest(camera.tebeJopa)) {
        zombi.health = 0;
}
if (camera.mc1.gravitation.hitTest(camera.gravitation)) {
        speed = speed;
} else {
        camera.mc1._y += 24;
}

6 as
Код AS1/AS2:

if (level == 0) {
        if (opit>=100) {
                level = 1;
        }
}
if (level == 1) {
        if (opit>=200) {
                level = 2;
        }
}
if (level == 2) {
        if (opit>=400) {
                level = 3;
        }
}
if (level == 3) {
        if (opit>=800) {
                level = 4;
        }
}
if (level == 4) {
        if (opit>=1600) {
                level = 5;
        }
}

7as

Код AS1/AS2:

if (health<=0) {
        gotoAndStop(4);
        speed = 0;
} else {
        health = health;
}
 
 
if (money>=100) {
        Goldmoney += 1;
        money -= 100;
}

8as

Код AS1/AS2:

 
if (camera.mc1._x<=0, camera.zombi._x<=0, camera.zombi._x>=camera.mc1._x) {
        camera.zombi._x -= speedZOMBI, camera.zombi.gotoAndPlay(3);
}
if (camera.mc1._x>=0, camera.zombi._x>=0, camera.zombi._x<=camera.mc1._x) {
        camera.zombi._x += speedZOMBI, camera.zombi.gotoAndPlay(7);
}
 
if (zombi_health<=0) {
        opit += 50, point += 1, camera.zombi._x=Math.floor(Math.random()*0)+1, zombi_health=100;
}



как только загружаеться кадр сразу кидает на 1 (нехочет на тот переходить в чем ошибка) ? , оутпут ничего не выдет

alexcon314 24.11.2010 08:24

А куда оно вообще должно переходить? Что у вас меняется -то?
Все переходы у вас за ифами, вот я к чему. Потом, stop() останавливает "движение" таймлайна, а не исполнение кода в текущем кадре.
Код:

stop();
//трэйс выполнится!
trace("!");

И это, вы уверены, что правильно прописали путь к инклудам?


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

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