
September 18th, 2005
05:35 AM
Neverside Newbie
Status: Offline!
- Preloader Question? -
I know how to make a preloader but...
How would I make one that when first loading, it shows an intro animation and an outro animation ( I can do this ), but then if you refreash or go to a different page, since it already has the data loaded and doesn't have to load it again, it would come up w/o showing all the intros/outros animations again....
Last edited by inpro, September 18th, 2005 05:35 AM (Edited 1 times)

September 18th, 2005
09:13 AM
Neverside Newbie
Status: Offline!
I was trying to do this earlier but gave up..but it just dawned on me that you can use cookies. :P
Main page:
<?php
if (!isset($_COOKIE['preloaded'])) {
header("Location: http://www.yoursite.com/preloader.php");
}
?>
Preloader.php:
<?php
setcookie("preloaded","yep",time()+60*60*24*30, "/");
(your preloader stuff here)
?>
Should work. :)
___________________


September 18th, 2005
04:46 PM
Neverside Newbie
Status: Offline!
here maybe this will help you, i just found this tutorial..
http://forum.24-7media.de/viewtopic.php?t=1932
Last edited by inpro, September 18th, 2005 04:46 PM (Edited 1 times)

September 19th, 2005
01:23 AM
Neverside Newbie
Status: Offline!
Hi,
mynimal, there IS a help in Flash. When you search a bit and read, you find out that there is a class called SharedObject. Then you start playing around with it or you look for a tutorial about that class. Basically, SharedObject is a way to store a limited amount of data (something like 100Kb) on the client's hard disk. Moreover it's easy to use. :)
There is another solution, kinda weird one : you can transmit a variable to flash from its html embed statement. For instance, create a simple .swf with only a dynamic textfield called "rcv" and in the only frame of the .fla, write "rcv.htmlText = woot;". That made, you go to the publish settings and publish an html + swf files set. Now edit the .html file and go to the embed tag, look at the src :
<embed src="trial.swf?woot=heya" quality="high" bgcolor="#ffffff" width="550" height="400" name="trial" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
I have added "?woot=heya" to the embed source. Now if you run the .html file, you'll see the "heya" appear in the textfield of the .swf. So you can send a variable to flash to say "play the intro" or "don't !" since your site isn't based on a single html page. See ?
Anyway...flash isn't designed on purpose for that use. It'll always be tricky to deal between dummy flash animations within html sites.
gl

September 19th, 2005
05:32 AM
Neverside Newbie
Status: Offline!
ok i figured out my problem, i'll write up a tute later.