dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: stopping download

  1. #1
    Member
    Join Date
    Oct 2000
    Location
    san franacisco, ca
    Posts
    43

    stopping download

    is there an official way to stop a downloading video. i'm using this function:

    function getVideo(whatVideo) {
    //stop the video that was loaded into a holderMc "video"
    text.video.stop();
    //unload it but leave the holder named "video"
    text.video.unloadMovie();
    if (whatVideo == "justZapIt") {
    //if just killing the loading or loaded video stop here
    return;
    } else {
    text.video.loadMovie(whatVideo);
    }
    }


    but the function isnt killing a video (.swf) that is downloading. if the function has called one movie then say five seconds later i click a button and rin the function with another movie to load the new one comes into "video" no prob. but the other one is still downloading loading and when it finishes downloading sometimes it takes over "video" and kills the playing one. how do i kill a downloading video?

    btw i have the most recent flash player.

    thanks a lot.

  2. #2
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    Are you using a Mac player or windows player?

    the only way to stop loading of external swf is with unloadMovie.

    you might try to verify that your script is working properly by tracing the _url property after you call unloadMovie.

    text.video.unloadMovie();
    trace(text.video._url);
    aviarts.com - web development and flash development

  3. #3
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    I've noticed this quirk before, seems to be the worst in IE 5.+ on Macs. I'm not sure what the solution is, but I've built my video on the main timeline with a preloader and it seems to fix the problem.

    The problem is the way Flash handles the data coming in from the video file, the first frame won't be recognized until the proper amount of information has been loaded into memory - which is enough data to begin playback. Just like any Flash movie.

    The problem is that there is a lag between you load call, and the time that the machine recognizes the data. In between that time, a viewer can click another button and begin loading another movie - seizing things, because there is already a movie loading. If you wait long enough, the first video will alwasy load - that may not be so good if the viewer goes to another section.

    Stitching helps, preloaders help, and data rates closer to actual connection speeds all help. Also use unloadMovie() whenever applicable to clear things. I've also found that video over 5 minutes hill hang, Macromedia recommends 4 minutes or less.

  4. #4
    Member
    Join Date
    Oct 2000
    Location
    san franacisco, ca
    Posts
    43

    thanks

    thanks for the tips, i'll try those things. i'm seeing similar things happening on other sites.

    another thing i've noticed is sound dropping out randomly but not too often, and sometimes the player crashes leaving the place where flash used to be in the browser white. but not crashing the browser. both dont crash the browser, and stopping the movie and playing again turns the sound back on.

    its funny thing is the clips i'm working shouldnt be causing problems. they mostlly under 5mb, from 30-60seconds and at 32X240 with mp3 stereo to mono option checked and 112kbps comperssion. all that adds up to a fairly light video. and i'm starting with an uncompressed source video. and the same stuff happens on different machines. but i have only ntices these probs on macs.

    the bbc has some vids up and they crashed my player. vw has some nice vids up and after 2/3 of one of thier videos the sound cut out. but it doesnt happen every time. if it is cached or not cached does not seem to matter either. i've reinstalled my player and am using the most current one.

    i'm useing sorenson squeeze, i wonder if going directally to .swf instead of importing the flv as i have been would make a difference? but that would mean different coding than i have been using for control and stuff. i've been putting the controls in the video .swf and they are super simple stop and play. no slider no volume. no looping movies checking things etc.

    any ideas? is this just how video in flash is?

    thanks.
    grish

  5. #5
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Just curious,

    What browser are you using when you experience these problems? What version of the Flash plugin do you have installed?

  6. #6
    Member
    Join Date
    Oct 2000
    Location
    san franacisco, ca
    Posts
    43

    info for wheels

    hey wheels- im useing ie 5.2.2 (5010.1) on osX 10.2.5 and my player is: 6.0r79 thanks for you interest. any ideas on how i may be able to battle these problems?

    thanks
    grish

  7. #7
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    I've found similar problems with this setup. I'm not sure. The issue seem to be the one I outlined above. I've experienced this problem loading into levels as well as movie clips. My gut feeling is that it has to do with Flash's built-in streaming methods.

    It seems that what you want is for the host movie to recognize the movie you are calling - I think that's why using a preloader on the front works, at least something is showing up right away. Flash just needs the first frame with all the header info/scripting to ID the movie and give it an instance reference.

    You just can't cancel a call when it's in midstream, maybe you could target a holder clip then do a duplicate to move it over. I'm not sure. This is definite bug in some browsers/plugin configs. Even a stop(); action on the first frame may help.

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