WEB adding loading icon to loading media

Discussion in 'OT Technology' started by drpepper, Apr 17, 2008.

  1. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    i have a flash game that wont display on the browser until its fully downloaded.

    my question is, how can i add this

    [​IMG]

    while its loading.
    and then obviously remove it after the flash game has loaded.
     
  2. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    place that inside the flash or on the page somewhere?
     
  3. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    javascript can probably do it
     
  4. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
  5. Logik

    Logik Livin la vida broka

    Joined:
    Jun 30, 2000
    Messages:
    20,667
    Likes Received:
    1
    Location:
    The Steel City
    why not just put the flash.swf in a DIV and have that loading image as the background of the DIV?

    or just put it in the flash itself (prolly the better solution)
     
  6. rwdftw

    rwdftw Guest

    I hate that shit, for me at least 90% of the time the thing freezes and slows down the browser BIG time. Especially if the video is hosted on some crappy service, where that thing shows up every 2 seconds because the site's buffering is slow as hell.

    Just put up "loading" text instead
     
  7. because the stage of the swf will pop up over it the very second that the first few bits are loaded. even though the game isn't loaded, the stage will still show up on top, but it will be blank until everything is loaded. better to build a preloader with your game.
     
    Last edited: Apr 18, 2008
  8. this is something off the top of my head, but you can do something like this (actionscript 3)

    set a movieclip with that image rotating (you can't import the gif and have it retain it's animation. you'll have to rebuild it in flash). set it to be 10 or so frames and have it rotate a full rotation and set your motion tween. throw this movieclip on the first frame and have it loop constantly. put the rest of your game on the 2nd frame.

    on the first frame, create your actions layer and do something along the lines of this:
    loader.addEventListener(ProgressEvent.PROGRESS, showProgress);
    loader.addEventListener(Event.COMPLETE, showLoadResult); (not sure if loader should be this to refer to the entire stage or not)

    have your showProgress loop to frame 1 constantly using onenterframe. you can use something like trace(loaded) or something like that and have an if statement where if trace(loaded) equals 100, go to your new function, otherwise keep looping that bitch.

    have your function showLoadResult go to the 2nd frame only if the project is fully-loaded, which the eventlistener should do for you automatically already. then in your 2nd frame, remove the eventlisteners for both functions.
     
    Last edited: Apr 18, 2008
  9. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    learn to max a loading screen in flash.
     
  10. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    <div id="i have a flash game that wont display on the browser until its fully downloaded.

    my question is, how can i add this

    [​IMG]

    while its loading.
    and then obviously remove it after the flash game has loaded."></div>
     
  11. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    lol fag
     
  12. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Takes one to know one :hsughno:
     

Share This Page