We help IT Professionals succeed at work.

Flash Randomizer

emma-louise
emma-louise asked
on
436 Views
Last Modified: 2012-06-27
I have an asp image randomizer (below) which swaps out gifs and jpgs residing in one directory.  Could this be used for flash modules too?  If not, can anyone suggest one I may use?

dim x(1000)
dim filesystem
dim folder
dim filecollection
dim idx
dim file
dim whichno

'The directory of all my pictures...
Const mypath="../uploads/"

Set filesystem = CreateObject("Scripting.FileSystemObject")
Set folder = filesystem.GetFolder(server.mappath(mypath))

Set filecollection = folder.Files

'Step through the files list, keeping track of
'the number of files....
idx=0
For Each file in filecollection
  idx=idx+1
  x(idx)=file.name
Next

'Choose a random picture
randomize timer
whichNo=int(rnd()*idx)+1

'Clean up...
set filesystem=nothing
set folder=nothing
set filecollection=nothing
Comment
Watch Question

Top Expert 2004
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thank you alorentz!  Good night
Top Expert 2004

Commented:
No problem...is this question closed then?

Author

Commented:
YIKES I forgot to award your points.  Smacked bottom for me!  Here you go now! Thanks again.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.