Форум 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=68348)

spyder_7 25.08.2005 17:21

помогите с управлением презентации
 
есть презентация.
при нажатии на кнопку фильм должен перейти на следуйщий раздел,
которые размечены заранее.
есть код для клавы, пытался переделать не получается.
помогите плиз!

Futs 25.08.2005 17:57

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

spyder_7 25.08.2005 18:13

А может у кого нибудь есть код!
Вот код для клавы. А мне нужно для кнопок
Код HTML:

keyDetect = new Object(); 
keyDetect.onKeyUp = function() {         
if (Key.getCode() == Key.RIGHT) {                 
_root.play();                 
currentStage++;         
} else if (Key.getCode() == Key.LEFT) {         
        if (currentStage>0) {                         
currentStage--;                 
}else {                         
currentStage = labelNum.length-1;                         
_root.gotoAndStop(_root._totalframes-1);                 
}                 
playBackward(labelNum[currentStage]);         
}
 }; 
Key.addListener(keyDetect);   
function playBackward(stopFrame) {         
_root.onEnterFrame = function() {                 
if (_root._currentframe != stopFrame) {                         
_root.prevFrame();                 
}else{                         
_root.gotoAndStop(stopFrame);                         
_root.onEnterFrame = null;                 
}         
}; 
}


Futs 26.08.2005 13:42

При условии, что не видно того, что у тебя там происходит, я бы сделал так
this.b1_mc.onPress=this.b2_mc.onPress=function (name_) {
name_=this._name
pusk(name_);
}
pusk = function(name_) {
if (name_ == b1_mc) {
_root.play();
currentStage++;
} else if (name_ == b2_mc) {
if (currentStage>0) {
currentStage--;
}else {
currentStage = labelNum.length-1;
_root.gotoAndStop(_root._totalframes-1);
}
playBackward(labelNum[currentStage]);
}
};
function playBackward(stopFrame) {
_root.onEnterFrame = function() {
if (_root._currentframe != stopFrame) {
_root.prevFrame();
}else{
_root.gotoAndStop(stopFrame);
_root.onEnterFrame = null;
}
}
}


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

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