A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: [Resolved] [Resolved] slight flicker inbetween loading .swf's

  1. #1
    Member
    Join Date
    Aug 2001
    Posts
    75
    i ve got a movie that loads multiple external .swf's at separtate times. when 1 finishes and the next plays there is a slight flicker that is too noticeable!

    this is really annoying as i ve built this entire thing thinking it would seamlessly connectwith each other.

    can u help?
    thx

  2. #2
    Junior Member
    Join Date
    Jul 2002
    Posts
    10
    check the movie's background in each of youre movies, not only just the ones you are loading, but the main one that is calling it.. if the background color is dark and matches your design then you shouldnt notice much at all. I had a gray flicker one time it was cause my master movie had a gray background to the movie.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    naw it flickers, here try this... it's not great mind you, but it might fix your problem, let me know it it works or not, I just wrote it 5 min ago so I didn't get to test it out much. anyway, just place this code before anything else on the first frame of the movie.

    Code:
    
    // removes the flicker when loading 
    // just place this on the first frame on the movie
    // or include it on the first frame
    _global.__ld = 777;
    MovieClip.prototype.myloadMovie = MovieClip.prototype.loadMovie;
    MovieClip.prototype.loadMovie = function(_murl, _method){
    	var my_mc = this._parent.createEmptyMovieClip(this._name+"_temp_mc", _global.__ld++);
    	my_mc._x+= -1000000;
    	my_mc.myloadMovie(_murl, _method);
    	this.onEnterFrame = function(){
    		if(my_mc.getBytesLoaded() == my_mc.getBytesTotal() && my_mc.getBytesTotal() > 0){
    			var xpos = this._x;
    			var ypos = this._y;
    			var mname = this._name;
    			this.swapDepths(my_mc.getDepth());
    			my_mc._x = xpos;
    			my_mc._y = ypos;
    			delete this.onEnterFrame;
    			this.removeMovieClip();
    			my_mc._name = mname;
    		}
    	}
    }

  4. #4
    Member
    Join Date
    Dec 2000
    Posts
    83
    What it sound like is that when you load the .swf it is taking an extra second to load and this results in a flicker.

    to fix this try to preload the .swf (even if it is only a couple of frames before) and have it load with a stop command in an empty keyframe. then when you want to run it give it a play or a gotoAndPlay() command. This should fix the problem.

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    nope, the flicker is caused by flash unloading the previous movie first (it does this automatically) then loading in the new movie inside the blank one, the flicker even happens when running a projector locally from a fast computer,

    just use the code I posted earlier and it will fix the flicker

  6. #6
    Member
    Join Date
    Aug 2001
    Posts
    75
    Big thanks for ur help all

    hey zaxis i guess i need to replace the instance names in your script to the ones in my movie.

    er.. having a little trouble a undertanding which bits do what. anychance u could tell me whats what. and do u mean putting it on the first frame of the _root?

    one last thing

    where do all u actionscripters learn actionscript?
    i know a fair amount from learning myself and doing a year of delphi (thats crap) at college (england)


    thanks again



  7. #7
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    no modifications needed, just copy the code above and paste on firt frame of the _root level, before any other action script, you do NOT need to change instance names or anything, you simpley just need the code there, \

    what it does is override the loadMovie method, when ever you use loadMovie, it creates a blank movie of the screen, loads the swf or jpeg into it, instead of your movieclip, then once it is fully loaded, it swaps them real fast eliminating the flicker.


  8. #8
    Member
    Join Date
    Aug 2001
    Posts
    75
    i tried the code in my movie.. it didn't seem to make any difference

    does the code work for u or does it need changing? - thanks

  9. #9
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    works fine for me, I did a test by covering some text with a movieclip so you could not see it, with out the above code when ever you use load movie the the movie clip you see the text for a split second, (flicker) with code added you never see the text, so it definetely works,

    paste some of your code in here so I can take a look'see

  10. #10
    Junior Member
    Join Date
    Aug 2002
    Posts
    13

    flicker

    hi.

    i also have the same flicker problem. I pasted the code in the first frame of my movie. most of the code fell on one line but i dont think that matters?

    It did not do anything for me either.

    the flicker only happens at first. after that the movies are in the cache and there is no flicker...but it is the initial flicker that we want to eliminate.

    i'll be following this thread. thanks.

  11. #11
    Member
    Join Date
    Aug 2001
    Posts
    75
    hi again

    i have made a little movie - 3 parts. 1 base, the _root.
    and 2 other movies which load into the base. have put the inside a zip on some freespace for u to have a look.

    the _root has zaxis code in

    but still flickers.

    let me know what u think

    o - and hello soumyaj krishnan

    if u find a way to do this not on this site could u let us know. cheers

  12. #12
    Member
    Join Date
    Aug 2001
    Posts
    75
    hi again

    i have made a little movie - 3 parts. 1 base, the _root.
    and 2 other movies which load into the base. have put the inside a zip on some freespace for u to have a look.

    http://members.lycos.co.uk/jsurdy/flicker.zip
    the link wont work just now - i have tried uploading but its being an arse. i'll email to u 2 for now

    the _root has zaxis code in

    but still flickers.

    let me know what u think

    o - and hello soumyaj krishnan

    if u find a way to do this not on this site could u let us know. cheers

  13. #13
    Member
    Join Date
    Aug 2001
    Posts
    75
    u'll have to give me ur proper email's cos it wont let me send attachments on this.

  14. #14
    Junior Member
    Join Date
    Aug 2002
    Posts
    13

    flicker

    i'll definitely let you know. but i think this code will work...with some tweeking. it makes sense and it works fine for zaxis.

    btw. please e-mail me at soumyajk@aol.com. my registered e-mail is not correct. bye.

  15. #15
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    here is a test fla showing that it works

    http://www.redwaveinteractive.com/temp/flicker.fla

    if you run the file it will load a picture from accuweather.com, and you will for a second see a random number, this is so you can easily see the flicker happen, goto frame one and uncomment out my code, (remove the "*/" and the "/*")

    when you run with the code uncommented, you will never see the random number appear, because their is no flicker!!

    I should not that you muct call the loadMovie from a movie clip in order for this to work, I do not think it will work with loadMovieNum

    *BAD* loadMovieNum("movie.swf", 4);
    *GOOD* MovieClip.loadMovie("movie.swf");

    hope this helps

  16. #16
    Junior Member
    Join Date
    Aug 2002
    Posts
    13

    flicker

    i have flash 5.0. zaxis, i think you have saved using 6.0.
    i have to figure out how to open this.

    i am going to change to MovieClip.loadMovie("movie.swf"); and see if this makes the difference.

  17. #17
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    what are you doing asking this question in the FLASH MX forum??? my code will only work in flash mx! not flash 5, geez,
    [Edited by zaxis on 08-28-2002 at 04:23 PM]

  18. #18
    Member
    Join Date
    Aug 2001
    Posts
    75
    I FOUND THE PROBLEM

    I have tried chaning and messing around

    I REALISED WHATS DIFFERENT

    the reason, zaxis, your code wasn't working for me and soumyaj krishnan was because we were using:

    loadMovie ("home.swf", bob_mc)

    instead of

    bob_mc.loadMovie("home.swf");

    try it - remember to tuen on zaxis code first though

    thanks everyone for your help - i'd never of got this alone

    big thanks zaxis


  19. #19
    Junior Member
    Join Date
    Aug 2002
    Posts
    13
    Originally posted by zaxis
    what are you doing asking this question in the FLASH MX forum??? my code will only work in flash mx! not flash 5, geez,
    [Edited by zaxis on 08-28-2002 at 04:23 PM]
    i was sent here from another flash forum where i had posted this same question.

  20. #20
    Junior Member
    Join Date
    Aug 2002
    Posts
    13
    how does this work?

    bob_mc.loadMovie("home.swf");

    is bob_mc the name of your root movie?

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