Relative and Absolute


This section should help you understand how to set the proper paths to any external files you may need to set in the HTML.

Best Practices

Always try to use an absolute path. The reason is because the wimpy.swf file is always loaded and displayed through and HTML page, hence the wimpy.swf always "takes on" the location of the hosting HTML page. By using an absolute path, you will eliminate a tremendous amount of frustration. Relative paths can be used, but do not always work with all browser, OS, and server configurations. Relative is cool only if all files reside in the same folder.


Relative Path Examples:

Think: "Relative to me."

Example 1
If your set up is as follows:

In this example, the skin_name.xml file is located in the same folder as wimpy.swf:
wimpySkin = "skin_name.xml";

Example 2 - looking forward
If your set up is as follows:

In this example, skin_name.xml is located one folder up from the folder that contains wimpy.swf:
wimpySwf= "wimpy.swf";
wimpySkin = "sub_folder/skin_name.xml";

Example 3 - looking backward
If your set up is as follows:

Here skin_name.xml is located one folder above the folder that contains wimpy.swf
wimpySkin = "../mp3s/skin_name.xml";
wimpySkin = "../mp3s/subfolder/skin_name.xml";

The dot dot slash (../) backs you out of a directory.


Absolute Path Example:

Think: "Start from the beginning."

Examples below all assume that your setup is as follows:

Example 1:
Here we use a single slash at the beginning to start from the "home" or "root" of our web site.
wimpySkin = "/mp3s/skin_name.xml";
wimpySkin = "/mp3s/subfolder/skin_name.xml";

Example 2:
Here we use a URL address:
wimpySkin = "";
wimpySkin = "";






  ©Copyright Plaino LLC. All rights reserved.