• I often struggle with this, sometimes I am able to solve it after much work and sometimes I can’t figure it out.

    I like to use flash widgets with my wordpress, like galleries, mp3 players, polls and whatnot.

    But I often struggle finding the correct “path”

    For instance:

    I just added a mp3 player that loads an external XML with the paths for each album cover and songs url.

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100%" height="100%" id="bplayer" align="bottom">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="allowFullScreen" value="false" />
    <param name="movie" value="<?php bloginfo('stylesheet_directory'); ?>/bplayer/bplayer.swf" /><param name="quality" value="best" /><param name="scale" value="noborder" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#999999" />	<embed src="<?php bloginfo('stylesheet_directory'); ?>/bplayer/bplayer.swf" quality="best" scale="noborder" wmode="transparent" bgcolor="#999999" width="100%" height="100%" name="bplayer" align="bottom" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="https://www.adobe.com/go/getflashplayer" />
    </object>

    That loads the player correctly, which is great. Inside the player there’s a piece of code that loads the XML. And that’s where my problem begins. What should be the path inside the flash file?

    Full path?
    Relative path?

    What should be the song and album cover paths inside the XML file?

    Full path?
    Relative path?

    And what if the flash loads external AS files? Does the path matter?

    I need a good tutorial to teach me about this flash paths and wordpress. If anyone can point me in the right direction I would appreciate.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The paths inside your Flash file are relative to where the .swf file is located itself. I would also change:
    <?php bloginfo('stylesheet_directory'); ?>
    to
    <?php bloginfo('template_url'); ?>
    If your swf files are located in your themes folder in wp-content.

    soamz

    (@soamz)

    How can I put the XML path absolute URL and where ??

    And what abt the images inside the XML , which we define ?
    Do we need to define them aslo absolute ??

    PLEASE HELPPPPPPPPPPPP!

    Equal

    (@equalmark)

    From memory (haven’t done this in a while) I think that the paths are always relative to the location of the file in which they are contained in. So as I have already said:

    The paths inside your Flash file are relative to where the .swf file is located itself

    Therefore if you .swf file is located in wp-content/uploads and your XML file was in the root of your site then the path inside the .swf file to the XML should be:

    ../../xmlfile.xml

    Again I think that the paths in your XML file are relative the XML file itself not the .swf file. An easy way (but not necessarily great) is to use absolute path everywhere!

    You can of course use Flash Vars, to pull the XML in the embed code rather than in the Flash File itself. This could mean that you could then change the XML file with a WordPress Custom Field, but maybe that is getting to complicated.

    Very much borderline torture.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Flash Paths and XML in the template’ is closed to new replies.