Показать сообщение отдельно
Старый 28.01.2013, 12:00
tall вне форума Посмотреть профиль Отправить личное сообщение для tall Найти все сообщения от tall
  № 2  
tall

Регистрация: Jan 2013
Сообщений: 3
Может попробую по другому спросить. Вот четыре направляющих.

Этот в первом кадре, оснавной.
Код AS1/AS2:
var mysound = new Sound();
_root.mysound.onLoad = function (loadedOK)
{
    if (loadedOK) 
    {
        _root.mysound.start(0, 9999);
    }
}
;
_root.mysound.loadSound("music.mp3", false);
Этот код от плеера.
Код AS1/AS2:
onClipEvent(load)
{
    _root.soundstatus = "on";
    _root.mySound = new Sound(_level0);
    _root.mySound2 = new Sound(_level1);
    _root.mySound3 = new Sound(_level2);
    _root.mySound4 = new Sound(_level3);
    _root.mySound5 = new Sound(_level4);
    maxvolume = 100;
    minvolume = 0;
}onClipEvent(enterFrame)
{
    if (_root.soundstatus == "on") 
    {
        step = 5;
    }
    if (_root.soundstatus == "off") 
    {
        step = -5;
    }
    maxvolume = maxvolume + step;
    if (maxvolume > 100) 
    {
        maxvolume = 100;
        if (_root.music == 1) 
        {
            _root.mysound.start(0, 9999);
            _root.music = 0;
        }
    }
    if (maxvolume < 0) 
    {
        maxvolume = 0;
        if (_root.music == -1) 
        {
            _root.mysound.stop();
            _root.music = 0;
        }
    }
    _root.mySound.setVolume(maxvolume);
    _root.mySound2.setVolume(maxvolume);
    _root.mySound3.setVolume(maxvolume);
    _root.mySound4.setVolume(maxvolume);
    _root.mySound5.setVolume(maxvolume);
}
И эти два от переключателя.
Код AS1/AS2:
on (rollOver)
{
    this.gotoAndPlay("s1");
    _root.cursor_top._visible = 1;
    _root.cursor_top.gotoAndStop(3);
}
on (rollOut, releaseOutside)
{
    this.gotoAndPlay("s2");
    _root.cursor_top._visible = 0;
}
on (release)
{
    gotoAndStop("s00");
}
on (release)
{
    _root.soundstatus = "off";
    _root.music = -1;
}
Код AS1/AS2:
on (rollOver)
{
    this.gotoAndPlay("s11");
    _root.cursor_top._visible = 1;
    _root.cursor_top.gotoAndStop(3);
}
on (rollOut, releaseOutside)
{
    this.gotoAndPlay("s22");
    _root.cursor_top._visible = 0;
}
on (release)
{
    gotoAndStop("s0");
}
on (release)
{
    _root.soundstatus = "on";
    if (_root.page != 4) 
    {
        _root.music = 1;
    }
}
Уверен что выход из положения прост как две копейки, но только где он? В прогамировании поставил бы себе единицу.


Последний раз редактировалось tall; 28.01.2013 в 12:14.