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.

Wondering why Flash Slideshow won't load when embeded in EE template?

December 07, 2007 11:54pm

Subscribe [6]
  • #1 / Dec 07, 2007 11:54pm

    SurfTasmania

    54 posts

    Hair pulling time again.

    I’m using Slideshow Pro with Director as the backend . . . this means I have a .swf created by Flash that contains an absolute XML file path.

    I have a test EE install on my laptop (localhost).

    I can happily embed this .swf slideshow on a standard HTML page on the server - but when I try to embed within an EE template - it is blank.

    Right-click tells me “movie not loaded”

    Can anyone save me pulling all my hair out?

    EDIT - BTW the XML path looks like this:
    http://xxxxx.slideshowpro.com/images.php?album=###

    And that is embeded in the swf file - does the php mean that something funny will happen with EE?

    Thanks in advance,

    Thomas

  • #2 / Dec 08, 2007 12:29am

    SurfTasmania

    54 posts

    Further . . . I have taken the exact HTML code that works fine in an HTML file on the server and put it into an “HTML” EE template - and it won’t work with the EE template?

    my head hurts.

  • #3 / Dec 08, 2007 2:09am

    Dane Thomas

    139 posts

    Now I’m sure I’ve come across this problem.

    I purchased Director thinking it would be easier for a client to use that rather than the built in EE gallery and even though Director is an impressive piece of work the thought of explaining and training in a new backend was enough for me not to implement it.

    I’m pretty sure I gave up investigating what the problem might be as I decided to ditch it. Maybe you can have a look at the install paths or the cross domain xml configs for slideshow/director that might be causing the slideshow not to work.

    I have a slideshow pro slideshow running out the output from a EE gallery template. So the client just uploads images into the regular EE gallery and I have a RSS template that generate the required information in a format that slideshow pro expects.

    The process works flawlessly, and as I say, even though Director is a slick piece of work, I think it is far easier if people are already familiar with the EE admin section that they stick with that.

  • #4 / Dec 08, 2007 2:12am

    Dane Thomas

    139 posts

    Just a follow up to your actual question…I’m pretty sure it’s more of a path/flash security issue rather than an EE template problem. The reason is that the PHP link to the RSS image feed isn’t being parsed by the EE template engine - it’s hardcoded into the SF file and it just calls on that.

  • #5 / Dec 08, 2007 5:17am

    Tim Griffiths

    36 posts

    I note you said the static html and the ee template are the same but have you compared the static page with the e-generated page? Do you get any source code from the EE template at all? 

    Can we see the html?

  • #6 / Dec 08, 2007 8:17am

    SurfTasmania

    54 posts

    Tim,

    Thanks mucho for your reply.

    It’s really late and I’ll have to get this HTML source up tomorrow - maybe on test code that is a bit “cleaner” and shorter.  Unfortunately this is all running on my laptop so I can’t point you at it.

    I appreciate you paying attention to my post - will get back with source code ASAP.

    Thomas

  • #7 / Dec 08, 2007 7:53pm

    SurfTasmania

    54 posts

    Tim et al,

    Ok . . . one step forward, two steps back.

    I’ve tried to move my testing to a “live” server so others can see.  But now I’m unable to even get the HTML version working.

    Here is where we (I) are (am).

    Here is the demo flash movie - it seems to play fine non-embeded?
    http://www.coastview.com.au/flash/features.swf

    Here is the AC_RunActiveContent.js file - it seems to be accessible?
    http://www.coastview.com.au/js/AC_RunActiveContent.js

    Here is the test HTML - which doesn’t seem to load the flash movie for me?
    http://www.coastview.com.au/SSP_labs/test.html

    My ignorant guess is that I’m having cross-domain problems?

    I have no idea why this same HTML code works fine on my laptop host?

    If I can get this working then maybe I can get back to seeing if it works when embeded inside an EE template?

    Thanks for the help (anyone!)

    Thomas

    —- Appendix—-

    Here is the HTML source:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    AC_FL_RunContent = 0;
    
        <title>SSP hosted Director test on CV server</title>
        <meta name="generator" content="BBEdit 8.2" />
    </head>
    <body>
    
    <!--url's used in the movie-->
    <!--text used in the movie-->
    
    <!-- saved from url=(0013)about:internet -->
    
        if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
        } else {
            AC_FL_RunContent(
                'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                'width', '480',
                'height', '200',
                'src', 'features',
                'quality', 'high',
                'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                'align', 'middle',
                'play', 'true',
                'loop', 'true',
                'scale', 'showall',
                'wmode', 'window',
                'devicefont', 'false',
                'id', 'features',
                'bgcolor', '#ffffff',
                'name', 'features',
                'menu', 'true',
                'allowFullScreen', 'false',
                'allowScriptAccess','sameDomain',
                'movie', 'features',
                'salign', ''
                ); //end AC code
        }
    
    <noscript>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="480" height="200" id="features" align="middle">
        
        
            <embed src="http://www.coastview.com.au/flash/features.swf" quality="high" bgcolor="#ffffff" width="480" height="200" name="features" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
    </noscript>
    </body>
    </html>
  • #8 / Dec 08, 2007 11:36pm

    John Henry Donovan

    12339 posts

    Whats the path to your XML?

  • #9 / Dec 08, 2007 11:54pm

    SurfTasmania

    54 posts

    G’day Vinny!

    First, thanks mate for all the general help and tutorials you have provided us punters over the months and years - good work mate!

    I’m using the “new” hosted Director service (kicking the tires on a 14 day demo).

    Here is the XML:
    http://tasmania.slideshowpro.com/images.php?album=367

    More info on this “hosted” version of Director is here:
    http://slideshowpro.net/products/slideshowpro_director/slideshowpro_director_hosting

  • #10 / Dec 09, 2007 12:08am

    John Henry Donovan

    12339 posts

    Cheers 😊

    Guessing you have a .htaccess file stripping the ‘?’ out of your URLS which is directly affecting your flash movie calling http://tasmania.slideshowpro.com/images.php?album=367


    edit
    I uploaded your files to another server not using a .htaccess and they play file so no cross domain issuedd

  • #11 / Dec 09, 2007 12:17am

    SurfTasmania

    54 posts

    OMG,

    I found the solution - with some help from folks in the SSP forums.

    Being fairly ignorant I thought I was following the manual to a T.

    I still can’t find the manual reference to this step but here is the bit that needed changing: ‘movie’ and ‘src’ in the AC_FL section?!!!

    if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
        } else {
            AC_FL_RunContent(
                'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
                'width', '480',
                'height', '200',
                'src', 'http://www.coastview.com.au/flash/features',
                'quality', 'high',
                'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                'align', 'middle',
                'play', 'true',
                'loop', 'true',
                'scale', 'showall',
                'wmode', 'window',
                'devicefont', 'false',
                'id', 'features',
                'bgcolor', '#ffffff',
                'name', 'features',
                'menu', 'true',
                'allowFullScreen', 'false',
                'allowScriptAccess','sameDomain',
                'movie', 'http://www.coastview.com.au/flash/features',
                'salign', ''
                ); //end AC code
        }

    Now to see if this also allows me to embed in EE templates?

  • #12 / Dec 09, 2007 12:21am

    John Henry Donovan

    12339 posts

    Glad you got it working. edited: So used to using SWFobject I did not even troubleshoot that code 😊

  • #13 / Dec 09, 2007 12:24am

    SurfTasmania

    54 posts

    Cheers 😊

    No worries - big cheers to you for all that help!

    Guessing you have a .htaccess file stripping the ‘?’ out of your URLS which is directly affecting your flash movie calling http://tasmania.slideshowpro.com/images.php?album=367

    Think I’ve found the problem above - 16 hours of hair pulling due to either (1) me being blind / unable to read a PDF manual or (2) something missing from said PDF manual.

    edit
    I uploaded your files to another server not using a .htaccess and they play file so no cross domain issuedd

    Yes mate, I’ve since found out that the Hosted Director prefernces control crossdomain and are set to glob all domains, unless you set otherwise - so should be no Xdomain issue.

    AND

    I think I now have the slideshows running, from an externally hosted install of Director (the SSP hosted service to be exact) in my EE tempates on my local MacBook install!

    That may mean that Jenas comments here need to be revised or re-considered?
    http://ellislab.com/forums/viewthread/57990/

    Hope for smooth sailing from here?

  • #14 / Dec 09, 2007 12:27am

    SurfTasmania

    54 posts

    Glad you got it working. Now to totally melt your head. If you look at http://www.webdelish.com/test.html you will see that I am using your origonal AC_FL code and it is working

    🐛  :gulp:  :ohh:  :grrr:  :shut:  :blank:

    WTF? (excuse my French)

    Vinny, do you have any idea what is going on?  Just when you think you understand something?

  • #15 / Dec 09, 2007 12:45am

    jejuna

    105 posts

    I recently made a real estate site for a client that uses EE, SlideShowPro, and Director. I chose to go with Director because it’s do darn easy for the client to upload a bunch of pictures and drag and drop in the order they want.

    Save yourself a headache, and use swfobject (http://blog.deconcept.com/swfobject/) to embed the flash file.

    Here’s how I’m doing it.

    In Director:

    They make an album for each property. They upload their images.
    They make a note of the album ID, and they enter that in the publish form.

    I need the album ID, in order to generate the right xml file, so I’m having swfobject call that as a variable.

    In the Flash movie, I gave SSP an instance name of “myssp”. One line of actionscript in a separate layer at frame 1:
    my_ssp.xmlFilePath=xmlfile;

    In the component inspector, leave the xml file path blank. Be sure to specify that the XML File Type is Director.

    In the <head></head> of the template, include the link to swobject.js, like so:


    Then, where you want your movie to display:

    <div id=“flash”> This text is replaced by the Flash movie.</div>

      var so = new SWFObject(”/slide.swf”, “mymovie”, “550”, “470”, “7”, “#ffffff”);
      so.addVariable(“xmlfile”, “/ssp_director/images.php?album={album}”);
      so.write(“flash”);


    That’s it! If your movie isn’t displaying at all, it’s probably something with the paths calling the swf and/or the xml file.

    (If you don’t need to call specific albums, you don’t need the actionscript, and you stick the URL that Director generates into the xml file path.)

    Hope this is helpful.

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

ExpressionEngine News!

#eecms, #events, #releases