A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Loading Random Images into slideshow???

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Location
    Boston
    Posts
    7

    Question Loading Random Images into slideshow???

    HI Flash gurus - I need help, i am using a slideshow template that I purchased and I wanted to get the images to load randomly, I contacted the author but he wants me to pay him extra for this and I have no money left for this project.

    basically, I'm looking to add a line to this as2 file that would make the images load randomly without repeating and then start over when the cycle completes. I tried putting in an array but it caused all kinds of errors.

    Any help would be GREATLY appreciated.

    THX
    Attached Files Attached Files

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813

    Thumbs up Slight change.

    I made some modifications. I used a system that almost ensures that you get random numbers, might look strange, but it works. I wasn't able to test it so it is up to you. I changed the constructor a little, you'll need to to pass the total number of images that will be supplied as the last parameters for the constructor. I've also added a couple of other variables and arrays and loops.
    Last edited by samac1068; 08-26-2010 at 03:57 PM.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Location
    Boston
    Posts
    7
    Thank you so much Samac, do I need to input the image names somewhere? I'm getting errors reading "....simpleSlideShow/images/undefined.jpg" when I try to publish.

  4. #4
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    strange, it shouldn't give you that type of error. I'm assuming that your different images are named using numbers only?

    You can place in a couple of traces to see where the error exists. I would place it on line 190
    PHP Code:
    trace("Array list is: " orderByArr); 
    You should get a list of numbers in random order.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  5. #5
    Junior Member
    Join Date
    Oct 2009
    Location
    Boston
    Posts
    7
    HI Samac - Maybe this will help, here is the fla. yes, the images are titled with #'s. Thanks!!!

  6. #6
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    I didn't see any fla attached. The size may be too large to load here. You may need to use a third party server to share your file. I use mediafire.com
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  7. #7
    Junior Member
    Join Date
    Oct 2009
    Location
    Boston
    Posts
    7
    sorry..attachment
    Attached Files Attached Files

  8. #8
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Oops, I forgot to instantiate the orderByArr variable. Here is the updated version.
    Last edited by samac1068; 08-26-2010 at 03:57 PM.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  9. #9
    Junior Member
    Join Date
    Oct 2009
    Location
    Boston
    Posts
    7

    resolved

    You ROCK, Thanks!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center