Anybody know how I copuld set up a site to load .jpg and .gif from an external source?
Specifically, I have a site built with Flash MX. My client would like to have the ability to update the site with new photos whenever he chooses.
How would I go about this?
One option you may consider is putting your gifs or jpgs on a directory at a IIS server. Then give NT access rights to the directory to the client. Depending on how you have your network setup it can be very easy too do. This way once you have your images on the server the client can control what images should be displayed in Flash Mx. This is how I currently have it setup and it works great. I use ASP as the backend-scripting language. Basically this program reads the files from the directory and sends the current list of images to flash and flash does its thing. There is no changes or modifications on my part whats so ever.
ie. of the ASP page: Which just looks for gifs or jpgs in the directory, it can be modified to whatever type of files you want.
Dim sVirtualPath, sServer, sPhotNames, iCntr
sVirtualPath= “/images/photos/”
sServer= “MyServerName”
sPath= Server.MapPath(sVirtualPath)
Set fs = CreateObject(“Scripting.FileSystemObject”)
Set sImages = fs.GetFolder(sPath)
sPhotoNames=""
iCntr=0
For Each sFile In sImages.Files
'Include only jpg & gif files.
If Instr(1, LCase(sFile.Name), “.jpg”) > 0 OR Instr(1, LCase (sFile.Name), “.gif”) > 0 Then
sPhotoNames= sPhotoNames & sFile.Name & “,”
iCntr= iCntr + 1
End If
Next
If iCntr <> 0 Then 'Remove the last comma from the string
sPhotoNames= Mid(sPhotoNames, 1, Len(sPhotoNames)-1)
End If
response.write “sFilePath=http://” & sServer & sVirtualPath
response.write “&PhotoList=” & Server.UrlEncode(sPhotoNames)
response.write “&NumOfImages=” & iCntr