Visualizzazione dei risultati da 1 a 5 su 5

Discussione: caricamenti

  1. #1

    caricamenti

    il mio preload carica
    grafica e audio(da un file esterno)
    ma sfortunatamente ed inspiegabilmente sul 9% o 17% o meno si blocca
    chi mi sa spiegare perche???

  2. #2
    posta il codice

    regalami un oggi da favola...e il domani bhe!?non mi importa se tu 6 con me! ©Ily

  3. #3
    probabilmente ti carica prima l'uno o prima l'altro e non controlli che se uno e' caricato ma l'altro no deve continuare l' onEnterFrame o il gotoAndPlay fino al caricamento di entrambi ...

    Se hai un IF, ti crei una variabile sound_done = "OK" ed una graf_done = "OK" e fermi il preload solo quando sound_done==graf_done

    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  4. #4
    onClipEvent (load) {
    _visible = 0;
    //ho creato il file suono.swf con swiftmp3, senza stop
    loadMovieNum("suono.swf", 10);
    //credo l'oggetto sound
    _root.snd = new Sound(_level10);
    //e non lo faccio riprodurre :-P
    _root.stato="stop";
    //e tengo bloccato tutto sul preload..ok???!!!
    _root.stop();
    }
    onClipEvent (enterFrame) {
    //come puoi vedere controllo che prima ceh si esca dal preload e quindi avanti di un frame siano entrambi caricati!!
    car0 = _root.getBytesLoaded();
    tot0 = _root.getBytesTotal();
    car10 = _level10.getBytesLoaded();
    tot10 = _level10.getBytesTotal();
    if (_level10._url != null) {
    if (car0 == tot0 && car10 == tot10) {
    _root.nextFrame();
    //ora si puo riprodurre....anceh se con il "mostra streaming" (in locale) si riproduce senza aspettare che pure

    l'altro sia caricato totalmente!!!
    _root.stato="play";
    } else {
    _visible = 1;
    _root.preload.barra._xscale = Math.round((car0/tot0)*100);
    _root.preload.barra2._xscale = Math.round((car10/tot10)*100);
    _root.preload.loade.download = "BYTES LOADED "+Math.round(car0+car10);
    _root.preload.total.download = "BYTES TOTAL "+Math.round(tot0+tot10);
    _root.preload.numero.percentuale = Math.round(((car0+car10)/(tot0+to10))*10)+"%";
    _root.preload.numero2.percentuale = Math.round(((car0+car10)/(tot0+to10))*10)+"%";
    }
    }
    }
    dove sbaglio???

  5. #5
    _root.stato="stop"; // che e' ???
    _root.snd.stop(); // lo vedo meglio


    if (_level10._url != null) { // lo toglierei
    } // quindi anche questa in fondo



    poi ...
    Codice PHP:
    onClipEvent (enterFrame) {
    var 
    car0 _root.getBytesLoaded(); 
    var 
    tot0 _root.getBytesTotal(); 
    var 
    car10 __root.snd.getBytesLoaded(); 
    var 
    tot10 __root.snd.getBytesTotal(); 

    if (
    car0 == tot0 && car10 == tot10 && tot0>&& tot10>&& car10>1024) { 
       
    _root.nextFrame();
       
    _root.snd.start(0,999);
    }
    else {
      
    _root.preload.barra._xscale Math.round((car0/tot0)*100); 
      
    _root.preload.barra2._xscale Math.round((car10/tot10)*100); 
      
    _root.preload.loade.download "BYTES LOADED "+Math.round(car0+car10); 
      
    _root.preload.total.download "BYTES TOTAL "+Math.round(tot0+tot10); 
      
    _root.preload.numero.percentuale Math.round(((car0+car10)/(tot0+tot10))*10)+"%"
      
    _root.preload.numero2.percentuale Math.round(((car0+car10)/(tot0+tot10))*10)+"%"// che e' uguale a quella sopra, quindi credo inutile
    }

    prova e fammi sapere

    P.S. okkio che all' ultima barra avevi scritto to10 e non tot10
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.