• 0

mixing flash and php


Question

Hey people

I was recemmended by someone, saying can find anything here.

What I need some help doing is I have this slideshow that I made with flash. It uses an xml file to get the images from. What I'm having troubles doing is making it so it uses php to get the images from a db. I have looked around and tried using some of the command that your suppose to (loadVariables("show_news.php", this);) but that didn't seem to work...I have tried using

<?php

header('Content-Type: text/xml');

?>

inside the xml file, to make it think its a xml file, but that didn't seem to help...I'm new to php and flash so having troubles figuring this out. If anyone is able to help, would be awesome! Attatched is my fla and xml file so someone can hopefully take a look and hopefully at least point me in the right direction.

Thanks :D

slideshow.zipFetching info...

Link to comment
https://www.neowin.net/forum/topic/511224-mixing-flash-and-php/
Share on other sites

7 answers to this question

Recommended Posts

  • 0

I think I got it to work, though not using the tut. I had looked at that tut, but it kinda confused me lol I didn't really understand it. But I'm using the

<?php

header('Content-Type: text/xml');

?>

What I think I had done wrong was that I put it at the top of the page. Now I have it at the bottom of the page, and it works! Though I think I might have to use sessions to send to the images.php which images to look for since I don't think I can use images.php?gallery=1 or something (Though if you know of a way that I can, please let me know). The thing in flash is looking for

xmlData.load("images.php

Anyways, thanks for the help though! :D

  • 0

How would I make it so I can load the file like

src="slideshow.swf?xml_source=images.php"

I can't figure it out. See, all my pages will be dynamic, so when clicking on the link to view the page with the slideshow, you will be sent to

slideshow.php?slideshow=1

and such. and I want to be able to expand my slideshows so that I could have like 50 slideshows or something. So how would have it so that where I put the slideshow it will read

src="slideshow.swf?xml_source=images.php?slideshow=1"

I have tried googling, but I cna't find it anywhere...I know it can be done, other sites are doing it, but I don't have access to their fla. The only fla I have access to is the one from kirupa and it doesn't load them that way.

The way you shows, works, and is what I asked for, but then I figured out it wouldn't work the way I need it to. Unless that can be modified so that

myVars.load("images.php?gallery=1

can be dynamic and also be

myVars.load("images.php?gallery=2

and not have to have a second swf file that slideshow.

Hope my long post makes sense.

Will keep looking incase no one understands me hah

Thanks for any help! :D

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.