Comment posted Random Flash SWF Onload PHP Script by Francisco Aldunate.

me the script works correctly, but what if I want to put a swf with transparent background? Where do we draw the parameters?

powered by SEO Super Comments

  • Share/Bookmark

, , , ,

16 Reviews

  1. joe says:

    this is the best solution of any that I have seen.

    Thank you!!

  2. Kevin says:

    Thanks … this has been a life saver for me. I do have a question though. Once a random swf is playing, can it be set to play the other files in the directory in an endless loop until the page is reloaded?

  3. King says:

    @Kevin: Of course. Just try that. Echo that whatever you want in loop. Any file.

  4. Kevin says:

    I should have mentioned that I’m just learning … how do I do that? Thanks again!

  5. King says:

    @Kevin: Okay you have to just change swf in following line
    if (eregi(“swf”, $file))
    which becomes
    if (eregi(“jpg”, $file))
    in case of jpg images
    and change the lines in echo for images.
    echo > img src tags instead of embed tags
    See the second example I posted above.

  6. Kevin says:

    Great … thanks again!

  7. me the script works correctly, but what if I want to put a swf with transparent background? Where do we draw the parameters?

  8. sid says:

    hi nice script..used it..and working fine. i have a question, though. how can we make it go to next swf or previous swf files?

  9. Sheetal says:

    Hi
    Thanks for this wonderful information it help me alot..

  10. King says:

    @sid: Just refresh the page. Its random! Remember?

  11. King says:

    @Francisco Aldunate: There is a wmode parameter for flash files to make these transparent.
    See here: http://www.techmynd.com/how-to.....ansparent/

  12. Betsy says:

    I have been searching forever for a script like this. Thanks!!! I do have one question though. I am only working with 3 swf files right now and it pulls up the same one over and over quite often. Is there a way to change this code to make it pull them in order instead of randomly? I am very, very new to PHP so please be specific. Thanks for you help.

  13. Jim says:

    WOW!… amazing… this has been a tough one to find out there.

    Is there a way that I can supress the #55555 random number at the end of the url?

  14. Travis says:

    Awesome code thanks! Is there a way to have it pull random files from a folder that contains gifs and swf files. For instance, on one load it might be a swf but on another load it may be an animated gif.

  15. flashcode says:

    Is it possible to allow full screen in the PHP code?