-
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
-
Senior Member
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.
-
Nice work Pellepiano! Can't read your post in 4 seconds...!
-
Senior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|