A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: website preloader

  1. #1

    website preloader

    is it at all possible to make a website preloader in flash...or atleast play a flash movie until exactly the time the website is done loading? or does anyone know a javascript or something that will do this?

  2. #2
    Huygens to Titan PCRIDE's Avatar
    Join Date
    May 2002
    Location
    PLUTO
    Posts
    1,335
    umm. ya thats how they usally work, you have a small animation that plays while loading,

    What is a website preloader?
    All out of Honey Buffers, so i grabed a few Goose Heads

  3. #3
    well so far i've only found tutorials showing how to preload the next scene in a movie...so im wondering if u can preload something thats not a movie in flash...i dont want to make my whole website a movie.

  4. #4
    Huygens to Titan PCRIDE's Avatar
    Join Date
    May 2002
    Location
    PLUTO
    Posts
    1,335
    what exactally are you doing, mixing HTML in it?

    you can load external files with the

    loadMovie("myswf.swf", "holder");

    and put a preloader on front of it
    All out of Honey Buffers, so i grabed a few Goose Heads

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Preloaders don't only preload the next scene in a movie!

    As for "preloading" an html page, guess you would have to use a popup and only open it into view, when it's fully loaded. You might want to check a javascript forum for that! This is mainly a Flash MX forum.

  6. #6
    what im trying to do is: i have a website. i want to make it all load before the page opens up. so i want to have a simple flash movie playing while the whole website loads. when it finishes loading, i want that page to show a link to the now-loaded page. maybe im just being too specific

  7. #7
    Huygens to Titan PCRIDE's Avatar
    Join Date
    May 2002
    Location
    PLUTO
    Posts
    1,335
    what im trying to do is: i have a website. i want to make it all load before the page opens up. so i want to have a simple flash movie playing while the whole website loads. when it finishes loading, i want that page to show a link to the now-loaded page. maybe im just being too specific

    what kind of website HTML, FLASH,

    you could make a preloader in FLASH and have that pop up with javaScript and then it would automaticallly forward you to the HTML SITE,

    you are not being specific on what you main site is made from. HTML???????
    FLASH??????
    All out of Honey Buffers, so i grabed a few Goose Heads

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    I guess what he wants is basically a flash intro which will eventually open his "normal" html website, already loaded up! And not see the html page start loading up when you get to it! Get it?

  9. #9
    u got it oldn00b....html website...i just want some way for it to be preloaded while a flash movie is playing...although this may not work too well because the flash movie would have to load too... i dunno: mebe i'll just forget about the whole preloader thing.

  10. #10
    VIP Member
    Join Date
    Nov 2000
    Location
    United Kingdom
    Posts
    254
    here i am to help:
    <p>put this in your body tag</p>
    <p>&lt;body onload=&quot;showHideLayers('Layer1','','hide')&qu ot;&quot;&gt;</p>
    <p>then insert this is the head section:</p>
    <p>&lt;script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;&gt;<br>
    &lt;!--<br>
    function reloadPage(init) { //reloads the window if Nav4 resized<br>
    if (init==true) with (navigator) {if ((appName==&quot;Netscape&quot;)&amp;&amp;(parseIn t(appVersion)==4))
    {<br>
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=MM_reloadPage;
    }}<br>
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.pgH) location.reload();<br>
    }<br>
    reloadPage(true);</p>
    <p>function findObj(n, d) { //v4.01<br>
    var p,i,x; if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))&gt;0&amp;&amp;pare nt.frames.length)
    {<br>
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}<br>
    if(!(x=d[n])&amp;&amp;d.all) x=d.all[n]; for (i=0;!x&amp;&amp;i&lt;d.forms.length;i++)
    x=d.forms[i][n];<br>
    for(i=0;!x&amp;&amp;d.layers&amp;&amp;i&lt;d.layer s.length;i++) x=MM_findObj(n,d.layers[i].document);<br>
    if(!x &amp;&amp; d.getElementById) x=d.getElementById(n); return x;<br>
    }</p>
    <p>function showHideLayers() { //v6.0<br>
    var i,p,v,obj,args=showHideLayers.arguments;<br>
    for (i=0; i&lt;(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) {
    v=args[i+2];<br>
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;
    }<br>
    obj.visibility=v; }<br>
    }<br>
    //--&gt;<br>
    &lt;/script&gt;</p>
    <p><br>
    -----------------------------------------------</p>
    <p>now put you flash movie in a layer like so</p>
    <p>&lt;div id=&quot;Layer1&quot; style=&quot;position:absolute; left:250px; top:163px;
    width:277px; height:178px; z-index:1&quot;&gt;<br>
    FLASH STUFF GOES HERE LOADING LOADING&gt;&gt; ETC ETC<br>
    &lt;/div&gt;</p>
    <p>this will show at the beggining and then dissapear when the whole page is loaded.</p>
    Last edited by GrantUnwin; 07-30-2003 at 07:25 PM.

  11. #11
    thank you so very much, GrantUnwin!! This is incredible! I will be forced to name my firstborn son after you. Did you write this yourself or did you find it? This is pretty cool. Thanx.

  12. #12
    VIP Member
    Join Date
    Nov 2000
    Location
    United Kingdom
    Posts
    254
    why thank you. Its a prewriten code. Im actually going to post it somewhere now.

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