ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SlideShowPro and swfobject 2.1

August 13, 2008 3:37pm

Subscribe [4]
  • #1 / Aug 13, 2008 3:37pm

    mikeO

    22 posts

    I can’t for the life of me get SSP and swfobject to work in EE.

    Once I can get it working without any dynamic information being fed to it, I’m hoping that the existing tutorials will work to get the slideshow working with a dynamic xml feed. Ultimately the goal is to have a slideshow for each weblog entry within a “graphics-projects” template group.

    I’d really appreciate any help anyone can offer…

    What i have currently is this template:

    {exp:weblog:entries weblog="graphics-projects" limit="1"}
            
    <div id="hero"> 
    Alternate Flash Content
    </div>
    
    <div id="contentContainer" class="clearfix">
        <div id="main">    
    <!-- a bunch of dynamic information here for the actual weblog post -->
        </div><!-- end main -->
    
    {/exp:weblog:entries}

    and this is in the head:

    [removed][removed] 
        [removed]
        var flashvars = {};
        var params = {};
        var attributes = {};
        swfobject.embedSWF("http://dykeman.dev/index.php/swf/ssp.swf", "hero", "930", "315", "9.0.0", false, flashvars, params, attributes);
        [removed]

    The “ssp.swf” file has the following for it’s xml file path:

    <a href="http://dykeman.dev/index.php/embeds/ssp_xml">http://dykeman.dev/index.php/embeds/ssp_xml</a>

    And the “ssp_xml” template (type: xml) looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
        <album lgPath="http://dykeman.dev/index.php/images/graphics-projects" tnPath="http://dykeman.dev/index.php/images/graphics-projects/thumb" title="Album title" description="Album description" tn="album1/preview.jpg">
            crmLogo.jpg
            crmPrint.jpg
        </album>
    </gallery>

    The album lgpath is correct in that there is a folder there with the listed images inside.

    Everything looks right, however I just get a blank white screen where my images should be (see attached image).

    I’ve been banging me head trying to get this to work. I can get it to work just fine outside of EE on just a static HTML site…

  • #2 / Aug 13, 2008 3:53pm

    Mark Bowen

    12637 posts

    Hiya,

    Usually the main problem with flash is that the URL isn’t set correctly to the .swf file but it looks like you are linking directly to the .swf so that shouldn’t hopefully be the problem.

    I must say though that I wasn’t able to get to

    http://dykeman.dev/index.php/embeds/ssp_xml

    or

    http://dykeman.dev/index.php/swf/ssp.swf

    I just get an error message saying that the server can’t be found. Don’t know if that’s anything to do with it though? Are you experiencing any server issues at the moment?

    Best wishes,

    Mark

  • #3 / Aug 13, 2008 3:53pm

    mikeO

    22 posts

    developing on MAMP currently.

  • #4 / Aug 13, 2008 4:01pm

    Mark Bowen

    12637 posts

    Hmm,

    Could be a little more difficult to pinpoint this one then 😉

    What browser are you using - Safari or Firefox?

    If you try it in Safari and then bring up the Window->Activity window what does it say about your .swf file? Is it loading in or not?

    Best wishes,

    Mark

  • #5 / Aug 13, 2008 4:31pm

    mikeO

    22 posts

    thanks, that helped me figure out why the slides weren’t showing - i couldn’t grok that the url path in the flash file, the path in swfobject and the paths within the xml file must all be relative to where the swf is EMBEDDED via swfobject, as opposed to where it resides in the site folder structure - am i understanding that correctly, now?

  • #6 / Aug 13, 2008 5:07pm

    grantmx

    1439 posts

    Within in EE, not exactly.  But you should be able to point to everything using an absolute URL and it should work fine (SWF, XML and JavaScript).

    However, the problem looks to be your path to your XML. When I go to pull: http://www.dykeman.dev/index.php/embeds/ssp_xml I get a page error.  It should pull your XML.

    Same for the path to your swf file: http://dykeman.dev/index.php/swf/ssp.swf  That should come up too.

  • #7 / Aug 13, 2008 5:31pm

    mikeO

    22 posts

    As i mentioned above, I’m developing in MAMP - it’s on my local machine, NOT on the internet(s) 😉

    Thanks for the help, I’ve got things working, now - it had to do with discrepencies in the URLs and file paths.

  • #8 / Aug 13, 2008 6:32pm

    Mark Bowen

    12637 posts

    Hiya,

    Sorry I didn’t get back sooner on this one - was watching Oceans 13! 😊

    Glad you have it all sorted now. Thought it would be file paths somehow 😉

    Best wishes,

    Mark

  • #9 / Aug 13, 2008 6:40pm

    mikeO

    22 posts

    Ok - I am so close now! I can get it working dynamically on a per-entry basis according to this thread: http://ellislab.com/forums/viewthread/75062/

    But only if i haven’t removed index.php from the URL according to the exlude method listed here: http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Exclude_List_Method

    The minute I place my .htaccess file in the root to remove index.php nothing works, even if I re-write my paths without the index.php…

    This is what’s in my .htaccess file:

    RewriteEngine on
    RewriteCond $1 !^(images|system|themes|css|Scripts|favicon\.ico|robots\.txt|index\.php) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]

    Here is what things look like when it DOES work, without the .htaccess file

    HEAD:

    [removed][removed]
        [removed][removed]

    PROJECT CONTENT:

    {exp:weblog:entries weblog="graphics-projects" limit="1"}
        [removed]
        var flashvars = {xmlfile: "http://dykeman.dev/index.php/embeds/ssp_xml/{entry_id}"};
        var params = {allowScriptAccess: "always"};
        var attributes = {};
        swfobject.embedSWF("http://dykeman.dev/swf/ssp.swf", "hero", "930", "315", "9.0.0", false, flashvars, params, attributes);
        [removed]
    
    <div id="hero"> 
    Alternate Flash Content
    </div>

    EMBEDS/XML_PHP/:

    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
        <album id="{segment_3}">
        {exp:weblog:entries dynamic="off" entry_id="{segment_3}" limit="1"}
            {slideshow_images}
            {file_url}
            {/slideshow_images}
        {/exp:weblog:entries}
        </album>
    </gallery>

    Can someone help me figure out what I need to do to make it work WITH the .htaccess file to remove index.php from the urls?

    Thank you so much - i am this close to accomplishing what I’ve been banging my head over for almost 48 hours… (perhaps I’m just slow, but I’m new to EE, not to mention slideshowpro and swfobject!)

  • #10 / Dec 02, 2008 11:49pm

    eclectiv

    133 posts

    I’m having the same issue as well with the htaccess not allowing the SWF file to show.  Anyone know how to resolve this?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases