Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 18
  1. #1

    Problemi con preload di mp3 esterno

    Allora, il mio problema è: dovrei fare un swf che deve caricare mp3 esterni, esempio quelli usati nella sezione loop ( http://flash-mx.html.it/loop/lista_loop.asp?idcat=12 ) ho provato a fare questo script:

    stop();
    Music = new Sound();
    Music.loadSound("Deep Purple - Child In Time.mp3", false);

    this.onEnterFrame = function() {
    function LoadSound() {
    car = Music.getBytesLoaded();
    tot = Music.getBytesTotal();
    part = Math.round(car/1024)+" kb di "+Math.round(tot/1024);
    }
    if (car == tot) {
    clearInterval(a);
    delete this.onEnterFrame;
    Music.start();
    } else {
    a = setInterval(LoadSound, 50);
    }
    };
    Music.onSoundComplete = Music.stop();

    solo che la musica parte fregandosene totalmente del preload e sicuramente ho sbagliato totalmente lo script, chi mi sa aiutare

  2. #2

  3. #3

  4. #4

  5. #5
    prova così:
    Music = new Sound();
    Music.path = this;
    Music.onLoad = function(info){
    if(info){
    this.start(0,999);
    }
    };
    Music.loadSound("file.mp3", false);


    this.onEnterFrame = function(){
    tot = s.getBytesTotal();
    car = s.getBytesLoaded();
    testo.text = "caricamento" + car + " su totali: " + tot;
    }
    testo=è il nome di istanza del campo dinamico
    fammi saperer!

  6. #6
    http://www.i-solutions.it/prove/loadsound9.swf
    la prima volta ti dice che carica 0 e dopo un po' parte la musica, se fai aggiorna ti dice che ha caricato tutti i bytes e parte subito

    Music = new Sound();
    Music.path = this;
    Music.onLoad = function(info){
    if(info){
    this.start(0,999);
    }
    };
    Music.loadSound("nap_carlos.mp3", false);


    this.onEnterFrame = function(){
    tot = Music.getBytesTotal();
    car = Music.getBytesLoaded();
    testo.text = "caricamento" + car + " su totali: " + tot;
    }

    questo script sta su Frame 1, _root

  7. #7
    ho dimenticato pezzi:
    Musica = new Sound();
    Musica.path = this;
    Musica.onLoad = function(info)
    {
    if(info){
    delete this.path.onEnterFrame
    this.start(0,999);
    }
    };
    Musica.loadSound("musica.mp3", false);


    this.onEnterFrame = function(){
    tot = Musica.getBytesTotal();
    car = Musica.getBytesLoaded();
    testo.text = "caricati: " + car + " su totali: " + tot;
    if(car == tot){
    this.onEnterFrame = undefined;
    }
    }

  8. #8

  9. #9
    nooooooooooooooo!!!!!!!!!!

  10. #10
    sostituisci questo:
    if(info){
    delete this.path.onEnterFrame
    this.start(0,999);
    con
    if(info){
    this.start(0,999);

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.