Forums: Flash:

 

Photo Browser flash+xml+php

first 2 3 4 last
 

scudsucker

craftymind 2004.03.24, 07:16PM


Not to rain on your parade, but the code crafty posted is now 5 years old.

Not that it is bad code, for flash 5 etc, but, you can find far more recent examples.. and I have not seen Crafty here for ages.


_____________________________________________
Hariyemadzisawira nhaka yedu. Down the scud and win!
quote
 

abcohen what did I do...

So I wrote some PHP to put an xml file based on the directory you point it to - read the files get the information and write it to the xml file and it works smile

write-xml.php
----


<?php


// Specify Directory where images are
$dir = "images/";

// open specified directory
$dirHandle = opendir($dir);

// Initialize the $returnstr variable
$returnstr = "<?xml version=\"1.0\" ?>";
$returnstr .= "\n";

while ($file = readdir($dirHandle)) {
// if not a subdirectory and only if filename contains the string .jpg, .gif, or .png
if(!is_dir($file) && strpos($file, '.jpg')>0 || strpos($file, '.gif')>0 || strpos($file, '.png')>0) {
// update count and string of files to be returned
$count++;
// $returnstr .= 'Image ' .$count. ' = ' .$file. '<br/>';
list($width, $height, $type, $attr) = getimagesize("$dir$file");
$returnstr .= '<img src="' . $dir . '' . $file . '" width="' . $width . '" height="' . $height . '"/>';
$returnstr .= "\n";

}

}


$filewrite ="gallery.xml";
$fh = fopen($filewrite,'w') or die("can't open file");
fwrite($fh, $returnstr);
fclose ($fh);

print $returnstr;
closedir($dirHandle);?>


you'll also need to upload a gallery.xml file to make sure it opens and writes smile

my only wish is that I could make it into a liquid flash display that it would resize based on screensize (no matter the image size [and those would fall back to a %])

 

Derek Chou A easy-to-use software to make photo flash

Flash Gallery Make is a photo slideshow maker, which can build standalone photo flash (.swf) and xml-driven photo slideshow with different transition effects and flash templates. With Flash Gallery Maker, you can create gorgeous photo flash slideshows for watching on computer, burn the auto-run flash photo album to gift CD/DVD, build a web gallery with amazing flash slideshows with dynamic SWF + HTML + XML files, or upload the slideshows to our free web album Go2Album, and then embed the slideshows to your personal website, MySpace, Blogger, Friendster and many other social networking websites.
Flash gallery maker

Derek Chou
quote
 

melchi03 Help

Hello I need help to modify the code to show images in the centre of scenario instead of upper left corner. Thanks

melchi
quote
 

tenPlus

I say good on crafty for open sourcing this, it's given a lot of ppl the opportunity to re-create and develop their own versions and ThumbsDown: to Derek for trying to cash in and piggyback on a very successful thread.

 

Storm

Derek is my new pool boy. Don't worry about him.

 

tenPlus

good to hear that he's pooling for you mate. At least I'll know that he's in good hands wink

 

festafotra Still anyone?

I'd like to add a new attribute for each image in the xml (just some text). Just few pictures so I could do it manually, the problem is how to read it from the SWF.

I guess I'd need an empty textfield with an instance name... and some more code I can't figure out.

Anyone still around for some help? Thanks.



PS: and thanks Crafty, wherever you are!

 

sureel Picasa?

The thing that i do not get is how do you link it with picasa since it was listed as picasa template... am i missing something? (paulvanroekel.nl/picasa/)

 

allison_platt Transparent Background

Love this flash photo stack! I like that this one can handle different size images where others cannot. Extreamly helpful in my case. I do have one question... Is it possible to make the background transparent?

Allison Platt
quote
 

samhl include swf in other file / picture path problem?

My problem is to include the *.swf in an other file. the swf is already loaded but no pictures are shown. i notice that the xml file is not really needed if the gallery.php exist.

here my hirachie and working/not working problems:


gallery/galleryname/*
this is the directory where i extract the content of the linked *zip file.
It working very fine if i browsing to:
- mywebsite.com/gallery/galleryname/index.php
- mywebsite.com/gallery/galleryname/gallery.swf
it works fine only include
- images.jpg
- gallery.swf
- index.php
- gallery.php

it seems that the gallery.xml is useless if the gallery.php exists? changing and deleting the gallery.xml does not have impact.
if i put other images in the directory they will be shown ... very cool. But finally i want include the *.swf in another site:

galleryshouldinclude.php
this page should have the gallery inside.
i try to include it with the same code as in the index.php with adjusted paths like

<object id="flashmovie" type="application/x-shockwave-flash" data="gallery/galleryname/gallery.swf" width="300" height="300">
<param name="movie" value="gallery/galleryname/gallery.swf" />
<param name="FlashVars" value="<? if(isset($_GET['image'])) echo "topimage=".$_GET['image'] ?>" />
</object>


by browsing to mywebsite.com/galleryshouldinclude.php my page is shown ... but the flash field is empty. the flash is loading (rightclick on the place shows me the typically flash contextmenu) but there are no pictures loading.

i try to change the gallery/galleryname/gallery.php the $xml path from <img src="'.$file.'" to <img src="gallery/galleryname/'.$file.'"

it takes some effect if i now want access the page through
- mywebsite.com/gallery/galleryname/index.php
- mywebsite.com/gallery/galleryname/gallery.swf
these pages now also shown an empty flash. so it looks like changing these part will definitivly change where the flash looks for the pictures but i have no chance to point the right ones?

What can i do?
- is it neccessary to work with the original gallery.fla (and export again as swf?) I dont want change any look and feel of the slides
- is it neccessary to include and edit the .xml?
- any ideas?

the swf and index.php works fine if i browse to the files in their subdirectory ... how can i include the swf in an file outside these directory?

 

DontBogartMe

you might want to write to him directly, cos he doesn't do much support in here.

 

samhl

yes i know that there will be no support from craftmind himself (since years) ... but this is the biggest thread i found for this gallery ... and maybe other people that USE these gallery have an idea or an hint .... seems that many people use this gallery

 
first 2 3 4 last
 

Forums: Flash: Photo Browser flash+xml+php

 
New Post
 
You must be logged in to post