home *** CD-ROM | disk | FTP | other *** search
Wrap
// shared decoding and rendering routines // global objects if (!doDebug) params=new Array(); userData=new Array(); // -------------------------------------- // registration information // -------------------------------------- xxlCodes = [31020, 37040, 33110, 37020, 37030, 37040, 33000, 37050]; // codes required to qualify XXL owner isXXL = false; //detected later regInfo=[]; regInfo[0] ={code:31020,name:'FL Studio Producer Edition',registered:false,needed:false}; // FL regInfo[1] ={code:31010,name:'FL Studio FruityLoops Edition',registered:false,needed:false}; regInfo[2] ={code:31000,name:'FL Studio Express Edition',registered:false,needed:false}; regInfo[3] ={code:37040,name:'Sytrus',registered:false,needed:false, isPlug:true}; regInfo[4] ={code:37030,name:'Fruity Soundfont Player',registered:false,needed:false, isPlug:true}; // Plugins regInfo[5] ={code:37020,name:'Fruity DX10',registered:false,needed:false, isPlug:true}; regInfo[6] ={code:33300,name:'Wasp',registered:false,needed:false, isPlug:true}; regInfo[7] ={code:33110,name:'SimSynth',registered:false,needed:false, isPlug:true}; regInfo[8] ={code:33000,name:'Fruity DrumSynth Live',registered:false,needed:false, isPlug:true}; regInfo[9] ={code:37050,name:'Fruity Video Player',registered:false,needed:false, isPlug:true}; regInfo[10]={code:33400,name:'DreamStation DXi',registered:false,needed:false, isPlug:true}; regInfo[11]={code:22100,name:'SimSynth (standalone)',registered:false,needed:false, isPlug:false}; regInfo[12]={code:22250,name:'EZ-Editor',registered:false,needed:false, isPlug:false}; regInfo[13]={code:22220,name:'BeatSlicer',registered:false,needed:false, isPlug:false}; regInfo[14]={code:0,name:'EZ-Generator',registered:false,needed:false, isPlug:false}; // {code:37021,name:'DX10 VSTi/DXi',registered:false,needed:false, isPlug:true}; // {code:37310,name:'WASP VSTi/DXi',registered:false,needed:false, isPlug:true}; // {code:37110,name:'SimSynth Live VSTi/DXi',registered:false,needed:false, isPlug:true}; // {code:33400,name:'DreamStation DXi',registered:false,needed:false, isPlug:true}; // object with product text info (matches the index from the previous one) productText=[]; // **** PRODUCER **** <<START>> productText[0] ='<div align="center"><img src="img_glob/_fllogo_producer.gif"xxlText></div>'; productText[0]+='<span class="fl-emph">Producer Edition contains: </span>'; productText[0]+='<ul><li class="fl-text">All <span class="fl-emph">Fruityloops Edition</span> features and…</li>'; productText[0]+='<li class="fl-text"> New Mixer Window (64 channels, track rerouting, ASIO track recording, integrated EQ and more).</li>'; productText[0]+='<li class="fl-text"> Audio tracks with waveform preview & support for cue points.</li>'; productText[0]+='<li class="fl-text"> Automation clips with spline-based envelopes and an LFO unit.</li>'; productText[0]+='<li class="fl-text"> Direct-to-disk recording & offline rendering of mixer tracks. </li>'; productText[0]+='<li class="fl-text"> Integrated Wave Editor.</li>'; productText[0]+='<li class="fl-text"> Life Time Free Updates to this edition.</li>'; // **** PRODUCER **** <<END>> // **** FRUITYLOOPS **** <<START>> productText[1] ='<div align="center"><img src="img_glob/_fllogo_fl.gif"xxlText></div>'; productText[1]+='<span class="fl-emph">Fruityloops Edition contains:</span>'; productText[1]+='<ul><li class="fl-text">All <span class="fl-emph">Express Edition</span> features and…</li>'; productText[1]+='<li class="fl-text">Piano roll allowing chords.</li>'; productText[1]+='<li class="fl-text">Full automation of all wheels.</li>'; productText[1]+='<li class="fl-text">ASIO support (allowing 2ms latency!).</li>'; productText[1]+='<li class="fl-text">Internal controllers.</li>'; productText[1]+='<li class="fl-text">Can be used as VSTi client in hosts like Cubase, Sonar, Logic, Orion, ...</li>'; productText[1]+='<li class="fl-text">Life Time Free Updates to this edition.</li>'; // **** FRUITYLOOPS **** <<END>> // **** EXPRESS **** <<START>> productText[2] ='<div align="center"><img src="img_glob/_fllogo_express.gif"xxlText></div>'; productText[2]+='<span class="fl-emph">Express Edition contains:</span>'; productText[2]+='<ul><li class="fl-text">External generators.</li>'; productText[2]+='<li class="fl-text">16Bit 44KHz stereo.</li>'; productText[2]+='<li class="fl-text">External midi control</li>'; productText[2]+='<li class="fl-text">Unlimited number of channels</li>'; productText[2]+='<li class="fl-text">4 to 64 notes in a pattern sequencer.</li>'; productText[2]+='<li class="fl-text">Integrated TS-404 bassline.</li>'; productText[2]+='<li class="fl-text">Support for VSTi & DXi.</li>'; productText[2]+='<li class="fl-text">Export to wav, MP3 & MIDI.</li>'; productText[2]+='<li class="fl-text">Playlist.</li>'; productText[2]+='<li class="fl-text">Piano keyboard.</li>'; productText[2]+='<li class="fl-text">Life Time Free Updates to this edition.</li>'; // **** EXPRESS **** <<END>> // **** XXL **** xxlText ='<div align="center"><img src="img_glob/_fllogo_xxl.gif"xxlText></div>'; xxlText+='<span class="fl-emph">XXL Edition contains:</span>'; xxlText+='<ul><li class="fl-text">All <span class="fl-emph">Producer Edition</span> features and…</li>'; xxlText+='<li class="fl-text">Sytrus Generator Plugin</li>'; xxlText+='<li class="fl-text">SimSynth Live Generator Plugin</li>'; xxlText+='<li class="fl-text">DX10 FMSynth Generator Plugin</li>'; xxlText+='<li class="fl-text">SoundFont Player Generator Plugin</li>'; xxlText+='<li class="fl-text">DrumSynth Live Generator Plugin</li>'; xxlText+='<li class="fl-text">SimSynth Live Generator Plugin</li>'; xxlText+='<li class="fl-text">Video Player Plugin</li>'; // **** XXL **** <<END>> productText[3] ='Sytrus is a versatile synthesizer combining Frequency Modulation (FM), Ring Modulation (RM), plucked string modeling and subtracting synthesis, and featuring a powerful envelope editor.<br>The synth includes a powerful editable unison mode and a comprehensive effects section.'; productText[4] ='Fruity Soundfont Player is an FL Studio add-on that gives you the power to load, play and render soundfonts (.sf2 files).'; productText[5] ='This DX10 FM synth is an FL Studio add-on that recreates the classic FM sound by using a harmonically rich modulating oscillator. Intuitive interface!'; productText[6] ='The WASP is the FL Studio generator version of the WASP, a complex subtractor using 2 oscillators. You get both the Fruity as the VSTi version.'; productText[7] ='SimSynth Live is the FL Studio generator version of SimSynth. This is a <b>realtime</b> version of the standalone version of SimSynth that can be run INSIDE FL Studio.'; productText[8] ='Gives you the power of Live drums in your FL Studio productions. Tweak your drums until they are just perfect!'; productText[9] ='Video Player will play videos together with your project. This allows you to create, adjust and synchronize your audio project with a video track of your choice.'; productText[10]='Dreamstation DXi is a versatile DirectX instrument creating "analog synth" quality sounds that works inside all DXi compatible hosts like FL Studio and Sonar.'; productText[11]='SimSynth Standalone is the original version of SimSynth. It has more advanced settings and can produce a wider variety of sounds but can not run in FL Studio. However, FL Studio can use its presets and riffs as regular samples!'; productText[12]='EZ Editor is the ideal companion for all your sample handling. Recording of WAV, set loop points, create custom shapes (formula editor), extract SoundFonts, ... '; productText[13]='BeatSlicer is an application that allows you to "slice" drumbreaks or other loops into its individual parts, rearrange them and use them inside FL Studio.'; productText[14]='Super Easy but powerful web site building tool (all of our own websites are built with this tool)! Buying it also gives you free access to +2000 customizable web template variations and to our Stock Images Library.'; // -------------------------------------- // boxed edition codes boxCodes=[31431,31441,31402,31401,31400,31541,31511,31449,31620,31630,31610]; // -------------------------------------- // this section contains routines to decode // the parameters // -------------------------------------- function arrBase16_dec() { // decode info an array if (doDebug) return; // DEBUG - do not decode params (they are already decoded for debug) var source=((paramsSource).slice(1)).toUpperCase(); // dump "G" at start & capitalize var i=0,j=0; var base16='0123456789ABCDEF'; var buffer=new Array(); buffer=source.split('G'); // init (in case FL doesn't pass anything) params[0]=''; params[1]=''; params[2]=''; params[3]=''; params[4]=''; // parse for (i=0;i<buffer.length;i++) { params[i]=''; for (j=0;j<buffer[i].length;j+=2) { params[i]+=String.fromCharCode(16*base16.indexOf(buffer[i].charAt(j))+base16.indexOf(buffer[i].charAt(j+1))); } } } function user_dec() { // decodes the user data elements // init (in case FL doesn't pass anything) userData[0]='';userData[1]='';userData[2]='';userData[3]=''; // parse userData[0]=params[1].substring(0,params[1].indexOf(':')); userData[1]=params[1].substring(params[1].indexOf(':')+1,params[1].lastIndexOf(':')); userData[2]=params[1].substring(params[1].indexOf('[')+1,params[1].indexOf(']')); userData[3]=params[1].substring(params[1].indexOf('|')+1,params[1].lastIndexOf('|')).slice('|'); // DEBUG //userData[3]='[]'; // END DEBUG } function scanRegInfo() { // scans ID-s and pluglist and updates regInfo var i,j; // scan codes var codes=userData[3].split('|'); for (i=0;i<codes.length;i++) { // check if the code means boxed version for (j=0;j<boxCodes.length;j++) { if (boxCodes[j]==Number(codes[i])) isBoxed=true; } // detect is it Creative version if (codes[i]=='21020' || codes[i]=='21420' || codes[i]=='21000' || codes[i]=='21010') { if (codes[i]=='21020' || codes[i]=='21420') { isCreative=true; regInfo[2].name='FL Studio Creative Edition'; // patch the regInfo/productText (temporal fix) productText[1]='<div align="center"><img src="img_glob/_fllogo_fl.gif"></div>'; productText[1]+='<span class="fl-emph">FL Studio Fruityloops Edition contains:</span>'; productText[1]+='<ul><li class="fl-text">All <span class="fl-emph">Creative Edition</span> features and…</li>'; productText[1]+='<li class="fl-text">Piano roll allowing chords.</li>'; productText[1]+='<li class="fl-text">Full automation of all wheels.</li>'; productText[1]+='<li class="fl-text">ASIO support (allowing 2ms latency!).</li>'; productText[1]+='<li class="fl-text">Internal controllers.</li>'; productText[1]+='<li class="fl-text">Can be used as VSTi client in hosts like Cubase, Sonar, Logic, Orion, ...</li>'; productText[1]+='<li class="fl-text">Life Time Free Updates to this edition.</li>'; } if (codes[i]=='21000' || codes[i]=='21010') { isBasic=true; productText[2] ='<div align="center"><img src="img_glob/_fllogo_express.gif"xxlText></div>'; productText[2]+='<span class="fl-emph">Express Edition contains:</span>'; productText[2]+='<ul><li class="fl-text">All <span class="fl-emph">Basic / XP Edition</span> features and…</li>'; productText[2]+='<li class="fl-text">External generators.</li>'; productText[2]+='<li class="fl-text">16Bit 44KHz stereo.</li>'; productText[2]+='<li class="fl-text">External midi control</li>'; productText[2]+='<li class="fl-text">Unlimited number of channels</li>'; productText[2]+='<li class="fl-text">4 to 64 notes in a pattern sequencer.</li>'; productText[2]+='<li class="fl-text">Integrated TS-404 bassline.</li>'; productText[2]+='<li class="fl-text">Support for VSTi & DXi.</li>'; productText[2]+='<li class="fl-text">Export to wav, MP3 & MIDI.</li>'; productText[2]+='<li class="fl-text">Advanced Playlist.</li>'; productText[2]+='<li class="fl-text">Piano keyboard.</li>'; productText[2]+='<li class="fl-text">Life Time Free Updates to this edition.</li>'; } } // set a product registered if a code is found for (j=0;j<regInfo.length;j++) { if (regInfo[j].code==Number(codes[i])) { regInfo[j].registered=true; } } } // scan pluglist var pluglist=params[4].split(':'); for (i=0;i<pluglist.length;i++) { for (j=0;j<regInfo.length;j++) { if (regInfo[j].name.toUpperCase()==pluglist[i].toUpperCase()) { regInfo[j].needed=true; } } } // detect XXL installation var hits = 0; for (i=0;i<xxlCodes.length;i++) { for (j=0;j<regInfo.length;j++) { if (regInfo[j].code==xxlCodes[i] && regInfo[j].registered) { hits++; } } } if (hits == xxlCodes.length) isXXL = true; } // -------------------------------------- // -------------------------------------- // to pass parameters as an URL // -------------------------------------- function escape2(source) { var i,c; var result=''; for (i=0;i<source.length;i++) { c=source.charAt(i); switch (true) { case (c==' '): result+='+'; break; case ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9') || c=='.' || c=='/' || c=='\\'): result+=c; break; default: result+='%'+(Number(source.charCodeAt(i)).toString(16)).toUpperCase(); } } return result; } // -------------------------------------- // -------------------------------------- // procedures for managing the expanding tables // -------------------------------------- function switchDTable(name) { // switches the body DIV of the table var tableBody=eval(name+'body'); var tableGadget=eval(name+'gadget'); if (tableBody.style.display=='none' || tableBody.style.display=='') { tableBody.style.display='block'; tableGadget.src='img_glob/_dyntbl_topleft2.gif'; } else { tableBody.style.display='none'; tableGadget.src='img_glob/_dyntbl_topleft1.gif'; } } var countDTable=1; // this variable is used to give tables unique names (next function) function makeDTable(title, contents, isOpened) { // renders a dynamic table // header document.write('<p><table class="table-header" onClick="switchDTable(\''); // >>> table header document.write('table'+(++countDTable)); // increase counter & write caller name document.write('\');" width="100%" border="0" cellspacing="0" cellpadding="0">'); document.write('<tr>'); document.write('<td width="22" height="22" align="left" background="img_glob/_dyntbl_top.gif">'); // >>> top left edge if (isOpened) document.write('<img src="img_glob/_dyntbl_topleft2.gif" name="'); else document.write('<img src="img_glob/_dyntbl_topleft1.gif" name="'); document.write('table'+countDTable+'gadget'); // write image name document.write('" width="22" height="22"></td>'); document.write('<td height="22" align="left" background="img_glob/_dyntbl_top.gif">'); // >>> top (title) document.write('<nobr><span class="table-title">'+title+'</span> <span class="table-titlenote">(click here for more information)</span></nobr></td>'); // write title document.write('<td width="22" height="22" align="right" background="img_glob/_dyntbl_top.gif"><img src="img_glob/_dyntbl_topright.gif" width="23" height="22"></td></tr></table>'); // >>> top right edge if (isOpened) document.write('<div class="table-body" style="display: block" id="table'+countDTable+'body">'+contents+'</div>'); // >>> write table body name (opened) & contents else document.write('<div class="table-body" style="display: none" id="table'+countDTable+'body">'+contents+'</div>'); // >>> write table body name (closed) & contents document.write('<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>'); // >>> bottom section document.write('<td width="22" height="22" align="left" background="img_glob/_dyntbl_bottom.gif"><img src="img_glob/_dyntbl_bottomleft.gif" width="23" height="22"></td>'); // >>> bottom left edge document.write('<td height="22" background="img_glob/_dyntbl_bottom.gif"> </td>'); // >>> bottom side document.write('<td width="22" height="22" align="right" background="img_glob/_dyntbl_bottom.gif"><img src="img_glob/_dyntbl_bottomright.gif" width="23" height="22"></td>'); // >>> bottom right edge document.write('</tr></table></p>'); } function makePlugDTable(i) { // makes a plugin/add-on dynamic table (based on the regInfo index) var contents=''; contents+='<table border="0" cellspacing="0" cellpadding="0"><tr>'; contents+='<td><img src="img_glob/Register '+regInfo[i].name+'.gif" width="130" height="130" align="left">'; contents+=productText[i]+'</td></tr></table>'; contents+='<br><br>Click '+returnBuyLink(regInfo[i].code)+'here</a> to order.'; if (regInfo[i].name=='SimSynth') { makeDTable('SimSynth Live',contents, false); } else { makeDTable(regInfo[i].name,contents, false); } } function makeFLDTable(i) { // makes a "FL info" dynamic table (based on the regInfo index) // i=-1 - demo; 2, 1, 0, 999 = baic, fruityloops, producer no xxl, producer and xxl var titleEnd; // modifies the table title var contents='<table style="width:97.2%" border="0" cellpadding="5" cellspacing="5">'; contents+='<tr valign="top">'; var cellSpan; // how many percent spans each table cell if (i==-1) cellSpan='25%'; if (i==2) cellSpan='33%'; if (i==1) cellSpan='50%'; if (i==0) cellSpan='100%'; if (i==999) cellSpan=''; if (i==999) { // user has registered Producer Edition (no upgrades, or only Lifetime Upd. upgrade for boxed) // if the edition is boxed, it means the user can buy Lifetime updates if (isBoxed) { document.write('<p>'+returnBuyLink(31080)+'You can purchase <span style="font-weight:bold;">Lifetime Free Updates</span> for FL Studio XXL Edition ($29).</a></p><br><br>'); } else { // user has all document.write('<p>No FL-Studio upgrades are available for your registration.</p>'); } } else { // write the tables.. if (i==-1) { // demo: buy express titleEnd="purchases"; contents+='<td width="'+cellSpan+'" class="fl-tbl">'; contents+=productText[2]; if (i==-1) { if (isBasic) { contents+='<p><strong>Upgrade price: $39 USD</strong></p>'+ '<p>'+returnBuyLink(31060)+'Click here to order</a></p>'; } else { contents+='<p><strong>Product price: $49 USD</strong></p>'+ '<p>'+returnBuyLink(31000)+'Click here to order</a></p>'; } } contents+='</td>'; } else { titleEnd="upgrades"; } if (i==2 || i==-1) { // demo or express contents+='<td width="'+cellSpan+'" class="fl-tbl">'; contents+=productText[1]; if (i==-1) { // demo: buy fruityloops if (isBasic) { contents+='<p><strong>Upgrade price: $79 USD</strong></p><p>'+returnBuyLink(31070)+'Click here to order</a></p>'; } else { contents+='<p><strong>Product price: $99 USD</strong></p><p>'+returnBuyLink(31010)+'Click here to order</a></p>'; } } if (i==2) { // express: upgrade to fruityloops (from express) if (isCreative) { contents+='<p><strong>Upgrade price: $69 USD</strong></p>'+ '<p>'+returnBuyLink(31075)+'Click here to upgrade</a></p>'; } else { contents+='<p><strong>Product price: $59 USD</strong></p>'+ '<p>'+returnBuyLink(31050)+'Click here to upgrade</a></p>'; } } contents+='</td>'; } if (i!=0) { // demo, express, fl options for producer contents+='<td width="'+cellSpan+'" class="fl-tbl">'; contents+=productText[0]; if (i==-1) { // demo: buy producer if (isBasic) { contents+= '<p><strong>Upgrade price: $129 USD</strong></p>'+ '<p>'+returnBuyLink(31071)+'Click here to order</a></p>'; } else { contents+= '<p><strong>Product price: $149 USD</strong></p>'+ '<p>'+returnBuyLink(31020)+'Click here to order</a></p>'; } } if (i==1) { // fl edition: upgrade to producer from fruityloops if (isBoxed) { contents+='<p><strong>Upgrade price (boxed): $79 USD</strong></p>'+ '<p><strong>Upgrade price (online): $69 USD</strong></p>'+ '<p>'+returnBuyLink(31081)+'Click here to upgrade</a></p>'; } else { contents+='<p><strong>Upgrade price: $59 USD</strong></p>'+ '<p>'+returnBuyLink(31040)+'Click here to upgrade</a></p>'; } } if (i==2) { // express: upgrade to producer from express (express can't be boxed) if (isCreative) { contents+='<p><strong>Upgrade price: $119 USD</strong></p>'+ '<p>'+returnBuyLink(31076)+'Click here to upgrade</a></p>'; } else { contents+='<p><strong>Upgrade price: $99 USD</strong></p>'+ '<p>'+returnBuyLink(31051)+'Click here to upgrade</a></p>'; } } contents+='</td>'; } // XXL contents+='<td width="'+cellSpan+'" class="fl-tbl">'; contents+=xxlText; if (isBoxed) { if (i==1) { // from fruityloops contents+='<p><strong>Upgrade price (boxed): $269 USD</strong></p>'+ '<p><strong>Upgrade price (online): click the link for more info (no DVD included)</strong></p>'+ '<p>'+returnBuyLink('')+'Click here to upgrade</a></p>'; } else if (i==0) { // from producer contents+='<p><strong>Upgrade price (boxed): $199 USD</strong></p>'+ '<p><strong>Upgrade price (online): click the link for more info (no DVD included)</strong></p>'+ '<p>'+returnBuyLink('')+'Click here to upgrade</a></p>'; } else { contents+='<p><strong>Upgrade price: click the link for more info</strong></p>'+ '<p>'+returnBuyLink('')+'Click here to upgrade</a></p>'; } } else { if (i==-1) { // buy if (isBasic) { contents+='<p><strong>Upgrade price: click the link for more info</strong></p>'+ '<p>'+returnBuyLink('')+'Click here to upgrade</a></p>'; } else { contents+='<p><strong>Product price (boxed): $399 USD</strong></p>'+ '<p><strong>Product price (online): $299 USD (no DVD included)</strong></p>'+ '<p>'+returnBuyLink('')+'Click here to upgrade</a></p>'; } } else { // upgrade (from any online version) contents+='<p><strong>Upgrade price: click the link for more info</strong></p>'+ '<p>'+returnBuyLink('')+'Click here to upgrade</a></p>'; } } contents+='</td>'; contents+='</tr></table>'; makeDTable('Available FL-Studio '+titleEnd,contents, true); } } // -------------------------------------- // -------------------------------------- // procedures for writing the links // -------------------------------------- function returnLink(action, productID) { // returns link for the product/action specified var linkContent=''; linkContent+='<a href="http://flredirect.e-officedirect.com/flredirect.exe?forumname=flstudio'; linkContent+='&action='+action; linkContent+='&username='+escape2(userData[0]); // linkContent+='&applicationID='+escape2(params[2])+'; appID not needed if (action=='buy') linkContent+='&P_code='+productID; // product code only in buy/upgrade links linkContent+='" target="_blank" class="link-common">'; return linkContent; } function returnSupportLink() { // support request link (reg problems) return returnLink('supportrequest',0); } function returnRegisterLink() { // code request/register link return returnLink('register',0); } function returnBuyLink(productID) { // product buy/upgrade return returnLink('buy',productID); } // --------------------------------------