A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Preloader

  1. #1
    Senior Member byweb's Avatar
    Join Date
    Apr 2007
    Location
    Andalucia (spain)
    Posts
    267

    Preloader

    I am doing a web page with koll moves, use a preloader with animation in the line of the time. In the frame 1. The problem is that when I go to approve my movie in the browser it is late very much in loading, and when it does it, the preloader does not meet.
    You can see it act in here
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    If you use one of the preloaders native to Koolmoves (Movie > Preload), your problem will probably go away.

  3. #3
    Senior Member byweb's Avatar
    Join Date
    Apr 2007
    Location
    Andalucia (spain)
    Posts
    267
    ok, but I want this preload is as a part of the animation. I use a mc of 1024x768 as background, and this one adapts to the size of the browser. If I use as preload a file .fun says to me in the dialogue box " pGliphHolder is NULL encountered in ExportSwfBody ". Because of it I have a preload in the line of the time. Thank you For your response Bob.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    Put the preloader.fun file in the same directory as the main fun file.

  5. #5
    Senior Member byweb's Avatar
    Join Date
    Apr 2007
    Location
    Andalucia (spain)
    Posts
    267
    It is in the same directory. Thanks.

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    Email the preloader .fun file, zipped, to koolmoves support. I know this bug has occurred before and I have forgotten to fix it.

  7. #7
    Senior Member byweb's Avatar
    Join Date
    Apr 2007
    Location
    Andalucia (spain)
    Posts
    267
    Thank you for your interest Bob, already I solved it with MovieClipLoader. I create a movie called preload.swf, only use this code ActionScript in the first Frame:
    Code:
    Stage.scaleMode = "noScale";
    stageListener = new Object();
    stageListener.onResize = stageResize;
    Stage.addListener(stageListener);
    //recibe bytes devuleve kb
    function bytes2kb(val){
    	return Math.round(val/1024)
    }
    //holder para el contenido.
    createEmptyMovieClip("holder",1);
    //atachamos el preloader.
    attachMovie("loader","loader",2,{_x:150.2,_y:241.1});
    loader.box.autoSize = "right";
    loader.barra._xscale = 1;
    //objeto mcloader
    my_mcl = new MovieClipLoader();
    //listener
    my_mcl_listener = new Object();
    //callback para cuando empieze la carga
    my_mcl_listener.onLoadStart = function(t){	
    	t._visible = false;
    }
    //callback cada vez que se cargue algo
    my_mcl_listener.onLoadProgress = function (t,bl,bt){
    	var p = (bl / bt) * 100
    	loader.box.text = "cargados: " + bytes2kb(bl) + " de " + bytes2kb(bt) + "KB";
    	loader.barra._xscale = p;
    }
    //callback en caso de error
    my_mcl_listener.onLoadError = function (t,ec){
    	loader.box.text = ec;
    }
    //callback para cuando se termina la carga.
    my_mcl_listener.onLoadComplete = function(t){
    	loader._visible = false;
    	t._visible = true;
    }
    //agregamos el listener al mcloader
    my_mcl.addListener(my_mcl_listener);
    //cargamos la imagen.
    my_mcl.loadClip("main.swf",holder);
    stop();
    And now work perfect HERE

  8. #8
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    That does look nice.
    I like how it's integrated into your movie.

    Too bad there isn't a component for preloaders where we could just drop on onto the stage, set some parameters and BAM! Integrated preloader.

    Is it even possible to create a preloader componenet?
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  9. #9
    Senior Member byweb's Avatar
    Join Date
    Apr 2007
    Location
    Andalucia (spain)
    Posts
    267
    Well Kool Moves, already goes preloaders integrated, and they can be designed in order that they join to the movie.
    In this case my problem was the background of the movie, this is an image that one adapts to the resolution of the browser, and I could not put a preloader of those of KM for which it was not compatible, then I adapts MovieClipLoader of Macromedia Flash to KM, and to worked.
    Can you see HERE
    Thank, for your comment.

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