Web Analytics Made Easy -
StatCounter New image/flash movie everytime you go to page? - CodingForum


No announcement yet.

New image/flash movie everytime you go to page?

  • Filter
  • Time
  • Show
Clear All
new posts

  • New image/flash movie everytime you go to page?

    Hi .

    New to this forum. Not quite sure where this question would fall into, category-wise.

    I'd like to create a web page that has a flash movie in it.

    But the catch is this: Everytime you'd go to this web page, I'd like it to be coded in such a way that it would play at random one of a certain amount of flash movies.

    So is this done in FlashMX? JavaScript? I have DreamweaverMX if that can help....

    If anyone can point me in the right direction, I'd greatly appreciate it.


  • #2
    A server side option would probably be best as javascript can be disabled.

    PHP, if your host supports it, would easily be able to do such a thing.

    Have a look at this random image script -


    You could easily modify it so instead of an image, it does the flash file like so -

    Instead of -

    echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";

    You could have -

    echo "<embed src=\"$image_folder/$image_name\" />";

    (I can't remember exactly how to embed a flash file (should you use Object instead of Embed?), but you get the idea I hope! )


    • #3
      Hey mark87,

      I'm gonna contact my host right after this.

      This might do the trick! if its supported.

      I am a little new to this so I'll have to baby step my way through it all but hopefully this is the first step.

      I'll post it here as soon as I know that the host can handle PHP. Got a phone call to make.


      • #4
        I called and they seem to think that anything will work... But they did not know what PHP was....gulp. Will just have to write up something quick and see if it works.



        • #5
          Do a quick php test, but if you are paying for hosting, you will most probably be able to use it.

          Save the following a .php file, upload and view it. If you see a lot of info, then PHP works!