Jump to content


Photo

php flash loader / gallery


  • Please log in to reply
6 replies to this topic

#1 gibbon

gibbon
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 30 September 2006 - 02:44 PM

Hi, just woundered how i would have a simple php page that loads a flash file into it, then after maybe 10 seconds it loads the next flash file and so on. maybe 3 flash files in a folder?

Thanks
Andy

#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 30 September 2006 - 02:47 PM

you would be best off to use an actionscript loader with a timer. then, when your page loads, you can simply embed the flash loader that will then load your first flash file. after your AS timer reaches 10 seconds (or whatever), you can have that flash loader pull in the next file and so on. the beauty of doing it this way is that you can use an XML file to tell the loader which movies to rotate through, so it would be entirely dynamic. you could then use your PHP to generate the XML file that the AS is reading so that the whole gallery can be controlled via a database or CMS.

make sense? i should probably start off by asking you how much experience you have with flash, too.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 gibbon

gibbon
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 30 September 2006 - 06:04 PM

only flash experince is like the usual animation and tweening and some script for urls and stuff, only simple stuff, and ive not done much with XML but ide really like to know both so maybe this is where i start, got any good places to get me started, i know php so thats ok.
Thanks
Andy

#4 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 30 September 2006 - 06:10 PM

one of the best resources i've found for ActionScript stuff is http://www.kirupa.com. there is a great XML photo gallery tutorial here on their site. basically, once you get your XML structure set, you can call a PHP page to generate the XML for you, so it's truly dynamic. also, keep in mind that when you load the movie with ActionScript, you're going to be loading an actual SWF file instead of images in your case.

otherwise, the tutorial should be a great help to you. if you're at all familiar with javascript, AS will be a cinch to pick up for you.

good luck!
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#5 gibbon

gibbon
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 01 October 2006 - 09:38 AM

HI, ok ive messed with that image gallery and ive got it loading swf's and able to click next and it changes to the next one, but im just woundered how in AS get it to change after say 10 seconds, and then i will delete the next and previous buttons.
Thanks
Andy

#6 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 01 October 2006 - 06:20 PM

HI, ok ive messed with that image gallery and ive got it loading swf's and able to click next and it changes to the next one, but im just woundered how in AS get it to change after say 10 seconds, and then i will delete the next and previous buttons.
Thanks
Andy

glad you asked ;) ... the next tutorial in that series on kirupa shows you how: here it is. the only thing to keep in mind is that you'll never get a precise measurement of time since flash is limited by version and speed of the playing computer.

have fun!
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#7 gibbon

gibbon
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 02 October 2006 - 10:35 PM

HI Any chance you could tell me a bit code to add so if the slide show reaches the end then go back to the begining.
thanks
Andy




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users