I'm using WAMP too. That demo doesn't have a place to put slideshow.php because it's hard coded into loader.swf - or at least that's what I'm assuming is going on. So in theory you could decompile loader.swf and change the reference for slideshow.xml to slideshow.php or use .htaccess to make the server parse xml as php (I mentioned this before, but I think it's a bad idea - could work out well though, especially on WAMP where strict <?php
tags are required, without that, the opening xml declaration might be mistaken for an opening php declaration). Or use PHP to create the slideshow.xml file on the fly at runtime.
I don't have an up to date Flash decompiler, editor or compiler. I tried the other two methods and they both worked.
The .htaccess method is probably better as long as it works. Here's how it goes -
Create a file named .htaccess - just the dot and the extension no filename. In it put this:
Code:
AddType application/x-httpd-php .xml
Save that as .htaccess and put it in the same folder with your loader.html and other files for this demo.
and rename your current slideshow.php file back to slideshow.xml. It will now be parsed as PHP by the server and seen by the the loader.swf as xml. That's it for the .htaccess method.
Now you can only do one or the other of these two methods, Not Both.
For this second approach I renamed loader.html to loader.php and added this highlighted bit at the top:
Code:
<?php
include 'slideshow.php';
?>
<!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>loader</title>
<script language="JavaScript" typ
And this is the contents of the slideshow.php file for this approach:
PHP Code:
<?php
file_put_contents('slideshow.xml', '<?xml version="1.0" encoding="iso-8859-1"?>
<slideshow displayTime="5"
transitionSpeed=".7"
transitionType="Fade"
motionType="None"
motionEasing="easeInOut"
randomize="false"
slideshowWidth="400"
slideshowHeight="220"
slideshowX="center"
slideshowY="0"
bgColor="FFFFFF"
bgOpacity="100"
useHtml="true"
showHideCaption="false"
captionBg="000000"
captionBgOpacity="0"
captionTextSize="11"
captionTextColor="FFFFFF"
captionBold="false"
captionPadding="7"
showNav="false"
autoHideNav="false"
navHiddenOpacity="40"
navX="335"
navY="193"
btnColor="FFFFFF"
btnHoverColor="FFCC00"
btnShadowOpacity="85"
btnGradientOpacity="20"
btnScale="120"
btnSpace="7"
navBgColor="333333"
navBgAlpha="0"
navCornerRadius="0"
navBorderWidth="1"
navBorderColor="FFFFFF"
navBorderAlpha="0"
navPadding="8"
tooltipSize="8"
tooltipColor="000000"
tooltipBold="true"
tooltipFill="FFFFFF"
tooltipStrokeColor="000000"
tooltipFillAlpha="80"
tooltipStroke="0"
tooltipStrokeAlpha="0"
tooltipCornerRadius="8"
loaderWidth="200"
loaderHeight="1"
loaderColor="FF0000"
loaderOpacity="100"
attachCaptionToImage="true"
cropImages="false"
slideshowMargin="0"
showMusicButton="false"
music="images/music.mp3"
musicVolume="50"
musicMuted="false"
musicLoop="true"
watermark=""
watermarkX="625"
watermarkY="30"
watermarkOpacity="100"
watermarkLink=""
watermarkLinkTarget="_blank"
captionsY="bottom"
>
<image img="images/image1.jpg" customtitle="Camomile" />
<image img="images/image2.jpg" customtitle="Bells" />
<image img="images/image3.jpg" customtitle="Market" />
</slideshow>', LOCK_EX);
?>
to prove that it works, I then deleted the slideshow.xml file and launched loader.php - it worked.
What should happen is each time loader.php is run, it will create a new slideshow.xml file. I used the LOCK_EX
flag so that if one user is logged on and writing a slideshow.xml at the same time as another user, only one slideshow.xml file will be written and used by both users, without risk of producing a corrupt slideshow.xml file.
Again, use only one or the other of these two methods, not both.
Bookmarks