A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Ok, I Load the Movie..They View it..What NOW?

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    I have a site. It loads SWFs off the main menu. The user waits through the preloader for the site, then waits again for the preloader off of the menu item - I load the movie.

    They view the movie and click a button that currently says Unload Movie,2. If, perchance they want to go back...they wait again.

    What can I do with the movie once it is loaded and they have looked at it---get it off of the screen without unloading it. And, if I leave it loaded, is it going to slow down the site performance?

    I finally understand the SWF vs. Scene debate...Help me click this last little piece in place.

  2. #2
    One thing a wise flash guy told me once -- never "unload a movie," because this takes it out of cache. Instead, have the movie end -- like have a button in the movie that goes to a blank frame or something. I have the same thing going on one of my web sites http://www.exit-6.com/ which is still a work in progress. I have the .swf's all load to layer 1, so one will replace the other, and if you close one down and re-open it, the .swf is still in the cache, so it's real quick. Hope this helps

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159

    aaaahhhh, soooooo

    uLtraV - thanks for the reply. I think I understand:
    So if I load a SWF in level 1, and then load another over it in Level 1...when I try to go back to the first it will still be there? And not have to load again?

    I have heard of folks using some method to load movies off screen or out of sight - I'd like to try that technique because some of my back SWF files are upto 90K and I don't want that big of a lag even with a preloader sequence.

    Anyone know how to do that and willing to share it?

  4. #4

    Re: aaaahhhh, soooooo

    If you load a .swf into layer 1, and then later load another .swf into layer 1, it simply replaces the first one. The first one is gone until you load it in again. If you load it again it should just pop up quickly -- unless you do an "unload movie," which will remove it from the cache. At least I think that's how it works!)
    Anyway, about the lag time -- I have the same problem on my site. The only real solution is to use movie clips rather than .swf's, which produces an entirely new set of hurdles. If you don't want to use a preloader (which is what I do,) I think the only way to do it is bounce to different frames with movie clips (instead of .swf's) or use a "set property:visibility" action, targeted to whatever movie clip is on the stage. If anyone has another solution, please post it because this is the main sticking point on a bunch of my sites -- even with a preloader there seems to be an unacceptable lag time between hitting a button and an .swf loading.
    Anyway, I hope this helps --

  5. #5
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159

    Caching SWFs

    I am pretty much confirmed that you are right on. I created an empty SWF 18x18pxl. So I load the movie I want and when I want it to go away, I load the empty SWF into the same level. Seems to keep the first movie in the cache just fine.

    I looked at a tutorial that suggested that you take an empty movie clip and put it somewhere on your screen and load your movies for the site into that MC so that by the time the user clicks on the button or whatever that loads the movie, it is already in the cache.

    I am wondering how you can do this without all those movies showing on your screen. It seems to me that if you had three movies that loaded off of a main menu for instance, you could create that MC and put three frames in it that loaded one SWF after the other using actionscript in a blank keyframe. I am going to try it using the visibility property set to 0 and see if that works...

  6. #6
    Probationary Member
    Join Date
    Jul 2000
    Posts
    118
    i think unlaoding movie is not the right thing, but you could set the visibility property to 0, resulting in just hiding the loading movie.

  7. #7
    Junior Member
    Join Date
    Sep 2000
    Posts
    4
    Hey GreatGooglyWoogly, Lance here using my "on holidays" mail... great ones so far too as the wife has me doing nothing but painting.
    Anyway onto your questions about swf's.
    When you are creating a flash site, its one big movie except that the user has the ability to go back and forth where they like. Use of preloaders and movie clips within one swf, I still believe is the way to go unless your total site is ginormous!!
    Like the sites I have shown you before (www.naturaltemptation.com.au) once it is loaded when a user goes back to a previous page they dont have to wait for anything to download. One of the strengths of flash is its ability to download a whole site in the background and call any page without waiting once the total swf has arrived.
    Loading and unloading swf's increases the risk of errors and murphies law, keep things as simple as possible, saves you and your client time. Also if you are having trouble seeing your clips loading before they are due to play (linear loading) make a layer that is ontop of all your other layers that has a rectangle that covers the total canvas, it will then hide everything else! Make sure it loads from top down though!!

    Good luck big guy, talk soon

    Lance

  8. #8
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159

    Lance Kenny, Ladies and Gentlemen! (applause)

    My friend from the other side of big ball of dirt! Hey thanks Lance and everyone for your replies. This issue seems to be the hardest thing I am learning about Flash.

    My total site size, if I count everything is approaching a whopping 1.5 meg! It is because I have multiple JPGs of book covers that I simply must show. That's too long to wait, so I went to loading SWF files off my main menu - it seems to work very well, especially if I don't (duh) unload the movie that my user just spent valuable seconds loading! What I am trying to figure out is how I can load the SWFs before the user wants them, but make their loading transparent to the user. I have heard people say that this is possible via Caching. I will try to experiment with using MCs instead of SWFs, but don't MCs count in your total load? I have either a huge load time, or lags in my page because it hasn't all loaded yet.

    Can't get head around it...must..control fist of death...ow, ow, ow, ow, klunk...

  9. #9

    ...just a thought

    u mentioned that you're showing lots of book covers & that you want to load stuff in advance of the user asking for it..
    maybe if the books are in various categories, you could have a title page per category, with some news etc for them to read - whilst they read, you're loading the book covers in?

    umm



    very useful topic btw.
    i shall keep an eye on your progress with this...gluk!

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