all groups > flash actionscript > july 2005 >
You're in the

flash actionscript

group:

Stop / Cancel loadMovie


Stop / Cancel loadMovie deathpie76
7/26/2005 8:41:00 PM
flash actionscript:
Is it possible to stop a loadMovie from downloading a file? I have an online
book where users click 'next' to load the next page. If they click it too
fast, everything turns to chaos as it tries to load every page in between. I'd
like to stop the previous page download when they request the loading of
another page. I've tried removeMovieClip() and unloadMovie(), but it doesn't
seem to take care of the problem.
Re: Stop / Cancel loadMovie Randy1969
7/26/2005 9:28:02 PM
Re: Stop / Cancel loadMovie deathpie76
7/27/2005 12:00:00 AM
Re: Stop / Cancel loadMovie bwm_razel
7/27/2005 12:00:00 AM
Personally I'd use attachMovie over loadMovie, it's much more convenient and
easier than creating an empty movie clip and all that jazz. attachMovie simply
dynamically loads the movie clip from the library of the .fla.
To use it, you use a code like this:

attachMovie("JoeSwimmer100", "JoeSwimmer100_mc", 1, {_x:164, _y:280});

The first part is the ID name you give it in the "linkage" area (right-click
on the movie clip in the library, select 'linkage'), the second part
(joeswimmer100_mc) is the name given to the instance of the mc when it is
attached, the third part (1) is the layer on which it is attached to, and the
fourth part is where you define the x and y coordinates. In other words, you
can make it appear anywhere on your screen by defining the x and y.

When the user clicks the button to go to the next page, put in code similar to
this:

on (release) {
JoeSwimmer100_mc.removeMovieClip();
}

Since every movie doesn't need to load, it's much less chaotic. If you want to
keep using loadMovie, you could load all the movie clips that are to be loaded
in the first frame of the .swf by exporting for actionscript and checking the
"export in first frame" button I do believe.
Re: Stop / Cancel loadMovie ANK...
7/27/2005 12:00:00 AM
you can just write unloavMovieClip("instancename of movieclip")

Re: Stop / Cancel loadMovie deathpie76
7/27/2005 12:00:00 AM
bwm_razel:
Well, unfortunately I'm stuck using loadMovie and loading external files. I'm
importing JPGs that the server creates, and the number of total JPGs is unknown
to the FLA (it's set using a FlashVars variable). The whole thing needs to be
automated, so I can't import the JPGs into my FLA file.

ANK...:
I have tried unloadMovie before with no luck. I think I even tried it in
conjunction with removeMovieClip().

Thanks to everyone for all the help, btw.

Re: Stop / Cancel loadMovie Randy1969
7/28/2005 3:36:31 PM
**What you can give a try is this:
createEmptyMovieClip("myClip",1);
myClip.createEmptyMovieClip("loader",0);
**Now we issue a loadMove inside the loader:
myClip.loader.loadMovie("something.swf");
**if you want to stop the download of the movie:
myClip.removeMovieClip();
** since we are loading 2 layers inside the movie, we should by pass checks to
determine if the current vlip were trying to remove is "busy" or not.
If this dosen't work let me know.

Regards,

AddThis Social Bookmark Button