Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash dynamic slide show

Status
Not open for further replies.

aamaker

Programmer
Jan 20, 2002
222
US
Im looking for a way (using flash MX) to dynamically retrieve and display photos in a region of a page.... ideally, the images would fade from one to the other.

I'd like it to automatically retrieve the JPEG image filenames from a particular folder OR if it helps I can create a recordes or array of all the filenames.

Has anyone seen anything similar to this out on the web or has anyone had any experience building something like this?

Thanks!
 
You can use loadMovie to bring the jpgs into your movie. Best way to do this is to create an empty movieclip to act as a picture holder and load the jpg into it. The syntax is:

Code:
this.createEmptyMovieClip('holderClip',10);
holderClip.loadMovie('yourJpg.jpg');

Flash alone can't browse a dirctory and pick up filenames (for security reasons) but you can store the predefined names in an array as you suggest or use serverside code to browse the directories for you then pass the names as variables to Flash.

Making the images fade in and out can be accomplished with use of setInterval or enterFrame scripts which monitor the load progress of the jpg (via getBytesLoaded()) and run a fade script when the image is ready for display.

Jpgs must be saved as non-progressive format for Flash to display them.
 
I have built something like that using MX Pro 2004 and an XML datasource.

Then using the XML Connector and a Data Set I cycle through the images based on a timer.

Let me know if you need more info. The process is to much to go into if you don't have MX 2004 Pro. If you have another version of Flash it can still be done it is just a different process.

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top