How to compress the swfobject.js v2.1 source file using YUI Compressor?
• Download the latest version of the YUI Compressor • Unzip the yuicompressor-x.x.x.zip file • Open the uncompressed swfobject.js file in a text or code editor and remove the following conditional compiling directives and JavaScript code (line 85-92): /*@cc_on ie = true; @if (@_win32) windows = true; @elif (@_mac) mac = true; @end @*/ • Save your adjusted uncompressed swfobject.js file • Compress this file (for more info, please read the YUI Compressor documentation), e.g.: java -jar /yuicompressorpath/yuicompressor-2.3.5/build/yuicompressor-2.3.5.jar -o /swfobjectpath/swfobject.js /swfobjectpath/src/swfobject.js • Open the compressed swfobject.js file • You have to re-add the Internet Explorer conditional compiling directives and the JavaScript code it embodies (this is a proprietary feature test to check e.g. whether a browser is Internet Explorer). For SWFObject 2.0 paste the following code block: /*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/In between: … i=false,q