A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: 2 Things!!!

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Location
    fort lauderdale
    Posts
    182

    2 Things!!!

    First: Im trying to create a flash sniffer, if the person does not have flash installed i would like to show a pic rather then thew animation, telling them to get flash!!

    Second: I would like some kind of script that would randomly load flash animations into a website. I have 6 flash animations, the customer would like to load them randomly, whenever the person visits the site again and again they will get a different animation
    everytime!!



    Thnx in advance


    sean

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    A simple solution is to have a sniffer page. A html page with a Flash MX swf in it that just redirects you to the real site. If the user dont have Flash or Flash MX the swf wont show and no redirection will be made from the Flash file.

    Then you have a redirect in the html document also, but it redirects after 4 seconds ( to a html page with links to macromedoia).

    In short. If the swf has not redirected you in 4 seconds the html will.

    This is what you put in the HEAD tag of the html.

    PHP Code:
    <meta http-equiv="refresh" content="4;URL=noflash.html"
    // RANDOM
    Heres how to load a random image ( of 6, named myImage1.jpg to myImage6.jpg )

    ran = math.round(math.random()*5+1);
    container.loadMovie("myImage"+ran+".jpg");

    To be shure that no image shows two times Flash needs to know of course what images that already has been shown to the user. You can only do that by setting a cookie. Flash MX uses Shared Objects to save variables locally on the users machine.

    There are a lot of threads aboy Shared Onjects here. And here is also a couple of links from google.

    http://www.google.com/search?hl=en&l...ects+%2B+flash
    Last edited by pellepiano; 01-05-2004 at 02:39 PM.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Nice work Pellepiano! Can't read your post in 4 seconds...!

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Ooops, sorry about that.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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