nel MC metti
codice:
onClipEvent(load)
{
function carica(num_loop)
{
//imposta le coordinate del drag//
min = 10;
max = 435;
//------------------------------//
percent = Math.floor((_x-min)/(max-min)*100);
loop = new Sound();
loop.attachSound(num_loop);
loop.start(0, 100);
volume = 50;
loop.setVolume("volume");
}
carica("loop2");
}
onClipEvent (mouseMove)
{
if (drag == 1)
{
_x = _root._xmouse+offsetX;
}
if (_x>max)
{
_x = max;
}
if (_x<min)
{
_x = min;
}
percent = Math.floor((_x-min)/(max-min)*100);
loop.setVolume(percent);
updateAfterEvent();
}
e poi fai dei bottoni per far partire i vari suoi a cui associ
codice:
on(release)
{
_root.loop.loop.stop();
_root.loop.carica("loop1");
}