home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 March
/
CMCD0305.ISO
/
Software
/
Shareware
/
Programare
/
diskdriver
/
diskdriver.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2005-01-10
|
8KB
|
305 lines
actualurl = _url;
theindex = length(actualurl) - 14;
thekey = actualurl.substr(0,theindex);
activetrack = 1;
activealbum = 1;
playpause.gotoAndStop(2);
loading.stop();
_soundbuftime = 0;
libraryload = true;
libraryplay = true;
loadlist = true;
this.onEnterFrame = function()
{
if(loadlist eq true)
{
tryingtoload = true;
songtitle = "loading play list";
playlist = new LoadVars();
playlist.wherearesongs = thekey add "diskdriver/";
playlist.thekey = thekey;
playlist.model = 201;
playlist.makelog = true;
playlist.makeplaylist = true;
playlist.onLoad = function(success)
{
if(success)
{
songtitle = "play list loaded";
loadpagedata = true;
}
else
{
playlist.sendAndLoad("http://www.visualsteel.net/cgi-bin/diskdriver/diskdriver2.0.cgi",playlist,"POST");
}
};
playlist.sendAndLoad("http://www.visualsteel.net/cgi-bin/diskdriver/diskdriver2.0.cgi",playlist,"POST");
loadlist = false;
}
if(loadpagedata eq true)
{
if(playlist.registered eq true)
{
pagedata = new LoadVars();
pagedata.onLoad = function(success)
{
if(success)
{
loadplaylist = true;
}
else
{
pagedata.sendAndLoad("",pagedata,"GET");
}
};
pagedata.sendAndLoad("",pagedata,"GET");
}
else
{
loadplaylist = true;
}
loadpagedata = false;
}
if(loadplaylist eq true)
{
if(playlist.authorized eq true)
{
thevolume = 99;
}
if(playlist.warning eq true)
{
this.attachMovie("warning","warning",this.getNextHighestDepth(),{_x:40,_y:125});
}
if(pagedata.track ne undefined)
{
activetrack = pagedata.track;
}
if(pagedata.album ne undefined)
{
activealbum = pagedata.album;
}
albumchange = true;
playtrack = true;
tryingtoload = false;
loadplaylist = false;
}
if(playtrack eq true)
{
playpause.gotoAndStop(1);
thestatus.colorfield._rotation = 90;
thestream.colorfield._rotation = 90;
if(albumchange eq true)
{
loadMovie(thekey add "covers/cdrom" add activealbum add ".jpg","artback");
loadMovie(thekey add "covers/cdrom_spin" add activealbum add ".jpg","loading.rom.artspin");
activetrack = 1;
albumchange = false;
}
thesoundclip = new Sound();
thesoundclip.loadSound(thekey add "diskdriver/" add eval("playlist.album" add activealbum) add "/" add eval("playlist.track" add activealbum add "_" add activetrack),true);
playtrack = false;
}
if(thevolume < 99 and volumeup eq true and playlist.authorized eq true)
{
thevolume = Number(thevolume) + 1;
}
if(thevolume > 0 and volumedown eq true)
{
thevolume = Number(thevolume) - 1;
}
if(rewind eq true)
{
whereisit = thesoundclip.position - thesoundclip.duration / 200;
thesoundclip.start(whereisit / 1000);
}
if(fast eq true)
{
whereisit = thesoundclip.position + thesoundclip.duration / 200;
thesoundclip.start(whereisit / 1000);
}
if(dragtoc eq true and getProperty(_root, _ymouse) < 180 and getProperty("theplaylist.tableofcontent", _height) > 180)
{
setProperty("theplaylist.tableofcontent", _Y, - (getProperty(_root, _ymouse) - 0) * ((getProperty("theplaylist.tableofcontent", _height) - 180) / 180));
}
if(mylistplay eq true)
{
activetrack = activerealtrack;
}
thesoundclip.onSoundComplete = function()
{
if(libraryplay eq true)
{
if(activetrack < eval("playlist.albumcount" add activealbum))
{
activetrack = Number(activetrack) + 1;
}
else
{
activetrack = 1;
if(activealbum < playlist.totalalbums)
{
activealbum = Number(activealbum) + 1;
}
else
{
activealbum = 1;
}
}
playtrack = true;
}
else if(mylistplay eq true)
{
if(activerealtrack < sortorder)
{
activerealtrack = Number(activerealtrack) + 1;
thesoundclip = new Sound();
thesoundclip.loadSound(thekey add eval("_root.realtrack" add activerealtrack),true);
}
else
{
activerealtrack = 1;
thesoundclip = new Sound();
thesoundclip.loadSound(thekey add _root.realtrack1,true);
}
}
};
if(libraryplay eq true)
{
songtitle = eval("playlist.track" add activealbum add "_" add activetrack).substring(0,eval("playlist.track" add activealbum add "_" add activetrack).length - 4);
}
else if(mylistplay eq true)
{
songtitle = eval("realtrackname" add activerealtrack);
}
thesoundclip.setVolume(thevolume);
thestatus.colorfield._rotation = 90 - 90 / thesoundclip.duration * thesoundclip.position;
thestream.colorfield._rotation = 90 - 90 / thesoundclip.getBytesTotal() * thesoundclip.getBytesLoaded();
if(playlist.authorized ne true)
{
thevolume = 0;
}
if(playlist.demo eq true and getTimer() > 20000)
{
thevolume = 10;
}
};
volumeup.onPress = function()
{
volumeup = true;
};
volumeup.onRelease = function()
{
volumeup = false;
};
volumeup.onReleaseOutside = function()
{
volumeup = false;
};
volumedown.onPress = function()
{
volumedown = true;
};
volumedown.onRelease = function()
{
volumedown = false;
};
volumedown.onReleaseOutside = function()
{
volumedown = false;
};
rewind.onPress = function()
{
playpause.gotoAndStop(1);
rewind = true;
};
rewind.onRelease = function()
{
rewind = false;
thesoundclip.start(thesoundclip.position / 1000);
};
rewind.onReleaseOutside = function()
{
rewind = false;
thesoundclip.start(thesoundclip.position / 1000);
};
fast.onPress = function()
{
playpause.gotoAndStop(1);
fast = true;
};
fast.onRelease = function()
{
fast = false;
thesoundclip.start(thesoundclip.position / 1000);
};
fast.onReleaseOutside = function()
{
fast = false;
thesoundclip.start(thesoundclip.position / 1000);
};
restart.onPress = function()
{
thesoundclip.start(0);
playpause.gotoAndStop(1);
};
trackdown.onRelease = function()
{
if(libraryplay eq true)
{
if(activetrack > 1 and tryingtoload ne true)
{
activetrack = Number(activetrack) - 1;
playtrack = true;
}
}
else if(mylistplay eq true and activerealtrack > 1)
{
playpause.gotoAndStop(1);
activerealtrack = Number(activerealtrack) - 1;
thesoundclip = new Sound();
thesoundclip.loadSound(thekey add eval("_root.realtrack" add activerealtrack),true);
}
};
trackup.onRelease = function()
{
if(libraryplay eq true and activetrack < eval("playlist.albumcount" add activealbum) and tryingtoload ne true)
{
activetrack = Number(activetrack) + 1;
playtrack = true;
}
else if(mylistplay eq true and activerealtrack < sortorder)
{
playpause.gotoAndStop(1);
activerealtrack = Number(activerealtrack) + 1;
thesoundclip = new Sound();
thesoundclip.loadSound(thekey add eval("_root.realtrack" add activerealtrack),true);
}
};
albumdown.onRelease = function()
{
if(activealbum > 1 and tryingtoload ne true and libraryplay eq true)
{
activealbum = Number(activealbum) - 1;
albumchange = true;
playtrack = true;
}
};
albumup.onRelease = function()
{
if(activealbum < playlist.totalalbums and tryingtoload ne true and libraryplay eq true)
{
activealbum = Number(activealbum) + 1;
albumchange = true;
playtrack = true;
}
};
lists.onRelease = function()
{
attachMovie("thelists","thelists",999,{_x:0,_y:0});
};
logo.onRelease = function()
{
attachMovie("notice","notice",1000,{_x:0,_y:0});
};
stop();