I would replace the line you've highlighted with a function call like openDocument(infostruc[current - 1].albumLink); and include the openDocument function (below) to do the work for you.
The openDocument function will figure out whether you're trying to open a PDF file or something else and do the right thing. It should be vert easy to extend this function to handle other document types if you need that in the future too.
Code:function openDocument(link:String) { var i:Number = link.lastIndexOf("."); var ext:String = link.substr(i+1, link.length-i-1).toLowerCase(); if (ext == "pdf") ssCore.Shell.open({path:ssGlobals.ssStartDir + "\\" + link}); else getURL(path, "_blank"); }




Reply With Quote