DOWNLOADS EXAMPLES SKINS DOCS SUPPORT
 
 

Insert via JavaScript

To use swfObject to embed WImpy into your page requires three files:

1. swfobject.js
2. wimpyConfigs.xml
3. An HTML page to embed wimpy into.

You can download the example here (swfobject-mp3.zip), which provides the three files mentioned above.

The remainder of this page attempts to explain how to use / configure each of the files.

In order to use the files included in the package, all of the files should be uploaded to the same folder as wimpy.

We highly recommend testing on a live server, as testing on a local PC may cause SWFObject or Wimpy to not load properly.

Example:

If Wimpy is located here:

http://www.yoursite.com/mp3s/wimpy.php
http://www.yoursite.com/mp3s/wimpy.swf

... then the enclosed files should reside in the "mp3s" folder as well:

http://www.yoursite.com/mp3s/wimpyConfigs.xml
http://www.yoursite.com/mp3s/wimpyObject.html
http://www.yoursite.com/mp3s/swfobject.js

After uploading the files to your web site, open wimpyObject.html up in a web browser

Enter the following into your browser's address bar:

Example:

http://www.yoursite.com/mp3s/wimpyObject.html

 

swfobject.js

SWFObject is a Javascript Flash Player detection and embedding script.

SWFObject is basically a tool that allows folks to incorporate Flash files into their pages using JavaScript.

The benefit of using javascript to present Flash files is that an additional level of version checking occurs, and for Internet Explorer users, Flash objects do not need to be "activated" (clicked on) before the user can interact with the Flash object. For example, a user would first have to click on Wimpy before they can click on any of the buttons, playlist or volume adjuster.

SWFObject was developed by Geoff Stearns, for more information on SWFObject and for FAQs about the code, visit Geoff's web site:

http://blog.deconcept.com/swfobject/

You will not need to re-download SWFObject, as the "wimpyObject.zip" package already includes swfobject.js.

Nothing needs to be done to swfobject.js -- it is "ready to roll."

 

wimpyObject.html

The file named wimpyObject.html consists of the following HTML code shown below.

We highly recommend editing the HTML code so that a full URL to each of the files is used -- especially if you plan on implementing Wimpy on a page that is located outside of your Wimpy installation folder.

In the code shown below:

- The items in red are the references to the files which you should change to be a full URLs to the file(s) that reside on your server.

- The items in green can be changed according to your needs.

- The remainder of the code should not be altered unless you are familiar with HTML.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Wimpy Player</title>
      <script language='javascript' src='http://www.yrousite.com/mp3s/swfobject.js'></script>
   </head>

   <body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
         <tr>
            <td align="center" valign="middle">

               <!-- START WIMPY PLAYER CODE -->

               <div id="flashcontent">
                  <strong>You need to upgrade your Flash Player</strong>
               </div>

               <script type="text/javascript">

                  // <![CDATA[
                  var myWidth = "480";
                  var myHeight = "140";
                  var myBkgdColor = "#000000";
                  var wimpyConfigs = "http://www.yrousite.com/mp3s/wimpyConfigs.xml";

                  var so = new SWFObject("wimpy.swf", "wimpyPlayer", myWidth, myHeight, "6,0,47,0", myBkgdColor);
                  so.addVariable("wimpyConfigs", wimpyConfigs);
                  so.addParam("scale", "noscale");
                  so.addParam("salign", "lt");
                  so.addParam("allowScriptAccess", "always");
                  so.addParam("menu", "false");
                  so.write("flashcontent");

                  // ]]>

               </script>

               <!-- END WIMPY PLAYER CODE -->

            </td>
         </tr>
      </table>

   </body>

</html>

 

wimpyConfigs.xml

The Wimpy configuration file is an XML file that allows you to configure how the player looks and behaves.

The wimpyConfigs.xml file included in the wimpyObject.zip package has been configured to set up Wimpy using "default settings.

If you're not afraid to edit XML code you can simply open wimpyConfigs.xml up in a text editor and adjust the options manually, or you can use the Customizer tool to generate a wimpyConfigs.xml file for you by filling out a form.

Click here for more information on using and configuring a wimpyConfigs.xml file.

The file named wimpyObject.html consists of the following HTML code shown below.

We highly recommend editing the XML code so that a full URLs are used to reference Wimpy files -- especially if you plan on implementing Wimpy on a page that is located outside of your Wimpy installation folder.

In the code shown below:

- The items in red are the references to the files which you should change to be a full URLs to the file(s) that reside on your server.

- The items in green can be changed according to your needs.

- The remainder of the code should not be altered unless you are familiar with XML.

Click here for more information on the meaning of each option.

<?xml version="1.0" encoding="UTF-8"?>

<wimpyConfigs version="1.0">

   <!-- Registration Code-->

   <wimpyReg>REGISTRATION_CODE_HERE</wimpyReg>

   <!-- File Paths -->
   <wimpySwf>http://www.yrousite.com/mp3s/wimpy.swf</wimpySwf>
   <wimpyApp>http://www.yrousite.com/mp3s/wimpy.php</wimpyApp>
   <wimpySkin>http://www.yrousite.com/mp3s/skin_name.xml</wimpySkin>
   <trackPlays> </trackPlays>
   <voteScript> </voteScript>

   <!-- Client Side -->
   <startPlayingOnload>yes</startPlayingOnload>
   <randomOnLoad>      no</randomOnLoad>
   <shuffleOnLoad>     no</shuffleOnLoad>
   <startOnTrack> </startOnTrack>
   <autoAdvance>       yes</autoAdvance>
   <loopPlaylist>      off</loopPlaylist>
   <popUpHelp>         no</popUpHelp>
   <displayDownloadButton>no</displayDownloadButton>
   <forceDownload>     no</forceDownload>
   <scrollInfoDisplay> yes</scrollInfoDisplay>
   <infoDisplayTime>   3</infoDisplayTime>
   <theVolume>         100</theVolume>
   <bufferAudio>       0</bufferAudio>
   <limitPlaytime> </limitPlaytime>

   <!-- Server Side -->
   <getMyid3info>      no</getMyid3info>
   <serveMP3>          no</serveMP3>
   <hide_folders>skins,getid3,_notes,_private,_vti_bin,_vti_cnf,_vti_pvt,_vti_txt,cgi-bin</hide_folders>
   <hide_files>skin.xml,wimpyConfigs.xml</hide_files>
   <startDir>          </startDir>
   <getid3libPath>     </getid3libPath>

   <!-- Cover Art -->
   <defaultVisualBaseName>coverart</defaultVisualBaseName>
   <defaultVisualExt>  jpg</defaultVisualExt>
   <defaultImage>      </defaultImage>
   <startupLogo>       </startupLogo>

   <!-- HTML display -->
   <wimpyHTMLpageTitle>Wimpy Player</wimpyHTMLpageTitle>
   <tptBkgd>           no</tptBkgd>
   <bkgdColor>         000000</bkgdColor>

   <!-- Dual Purpose -->
   <forceXMLplaylist> no</forceXMLplaylist>
   <useSysCodePage>   no</useSysCodePage>
   <ecommerce>        no</ecommerce>
   <ecomWindow>       _blank</ecomWindow>
   <icecast>          </icecast>
   <useMysql>        no</useMysql>

</wimpyConfigs>

 

 

 

 

 

 

 

 

  ©Copyright Plaino LLC. All rights reserved.