Hi,
I'v been watching the sreencast about slideshowpro integration. It's very usefull but ther is a problem:
where do I find te XML file? How do i even create it? (Is it automatically created by image gallery, by the slide show pro module istelf or do I heve to insert php somewere to get it?)

So far, this is what I did : create galleries upload and enable the ssp module. And create a view.

Thanks a lot for helping or giving the adress of a tutorial
Bee

Comments

guylm’s picture

I just wanted to help clear up one issue that I ran into and overlooked when implementing the .swf file.

The SlideShow Pro ActionScript that is part of the first frame assumes that thecontrol name for the SlideShow Pro object is called "ssp".

ssp.xmlFilePath = unescape(xmlfilepath);
ssp_vars = parameters.split(',');
for (var i = 0; i < ssp_vars.length; i++) {
var_value = ssp_vars[i].split(':');
if (var_value[1] == "True") {
var_value[1] = true;
}
else if (var_value[1] == "False") {
var_value[1] = false;
}
ssp[var_value[0]] = var_value[1];
}
// end

In order to set the object name to be ssp in Flash:

1. Select the layer in the timeline with the SlideShow Pro Object
2. Click the SlideShow Pro object and open the properties pane
3. Underneath the word "Component" on the top left, enter in "ssp" into the object name
4. Re-publish the swf file

Also, I went ahead and made sure the two parameters within the object set as follows:
XML File Path - set to blank
XML File Type - set to "Default"

Good luck!

nina_bee’s picture

Thnks for your help. For now I succeded with thickbox. I will give it a try on an other drupal site.
********^_^****
Bee

light-blue’s picture

In case it wasn't obvious (okay, it wasn't for me!), here is an example of using xmlFilePath with SSP Drupal, Flash, and actionscript (as 2.0). Yes, it could be improved (like the error message instead of real form validation--and there's too much logic in this template file -- node-gallery.tpl.php), but it works in 5.x!

    require_once 'sspclass.php' ;
    
    //first, determine the photoset from RSS feed
    //$subject='http://www.flickr.com/photos/39149067@N08/sets/72157605671235207/';
    $pattern = '|(\d){9,}|'; // should match /sets/numeric/
    foreach ($node->field_flickr_url as $value) {
    	$subject=$value['view'];
    	preg_match($pattern, $subject, $matches);
        if ($matches[0])
          $photosets[]=$matches[0];
    }

    if (!$photosets) {
      drupal_set_message('I could not locate your photoset. Please go back and try again.','error');
      return;
    }
    
    global $base_url; //http://api.drupal.org/api/function/url/5
    $swf='ssp_default.swf';
    $photosets_path=$base_url.'/files/flickr/photosets/'; //url() returns the i18n path too
    $swfs_path=$base_url.'/files/flickr/swfs/'; //url() returns the i18n path too
    $xmlfile="node-{$node->nid}.xml";
    
    //if more than one photoset, start off in gallery mode
    if (count($photosets)>1)
      $params="TRUE,galleryAppearance:Open at Startup" ;
     else
      $params="TRUE,galleryAppearance:Hidden" ;
      
      //$params="TRUE,albumBackgroundColor:0xFFFFFF" ;
    //ssp.galleryAppearance=\'Open at Startup\';,
    
    $myflickr = new makeSSPxml('/var/www/drupal/files/flickr/photosets/'.$xmlfile,1) ;
    $myflickr->debug(true) ;
    $myflickr->number(15) ;
    //$myflickr->add_interesting() ;
    //$myflickr->add_favorites('39149067@N08','mytitle','mydescription') ;
    //$myflickr->add_pool('39149067@N08') ;
    $myflickr->set_thumb($myflickr->indiv_thumb('39149067@N08')) ;
    
    foreach ($photosets as $value)
      $myflickr->add_photoset($value) ;
      
    $myflickr->links(false);
    
    $myflickr->finish() ;
    $myflickr->emit_headers() ;
print $photosets_path.$xmlfile; &parameters= print $params; " /> print $swfs_path.$swf; " /> print $photosets_path.$xmlfile; &parameters= print $params; "" src=" print $swfs_path.$swf; " quality="high" bgcolor="#ffffff" width="550" height="400" name="slideshow" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

?>