Visualizzazione dei risultati da 1 a 5 su 5

Discussione: sound

  1. #1

    sound

    salve ragazzi, un problema: l'oggetto sound

    devo inserire un loop in un filmato, ma voglio caricare il file musicale dall'esterno, senza appesantire il movie.

    //nel primo frame, livello "azioni":

    stop();
    new Sound("pippo");

    //associato al pulsante "on":

    on (press) {
    pippo.loadSound("pippo.dat", true);
    pippo.start(0,999);
    }


    cosa sbaglio?

  2. #2
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    stop();
    pippo = new Sound();

    on (press) {
    pippo.loadSound("pippo.dat", true);
    }

  3. #3
    salve negatyve, e grazie

    purtroppo non mi funziona ugualmente, mi dice che c'è un errore nell'"opening url"...

    che devo fare?

  4. #4

    non va!!!

    accidenti ragazzi, non va! non funziona

    //nel primo frame ho inserito:

    stop ();
    suono = new Sound();
    suono.loadSound ("pippo.dat", false);
    suono.start (0,999);

    //pulsante (per prova, anche se dovrebbe partire all'avvio):

    on (press) {
    pippo.loadSound("pippo.dat", false);
    pippo.start ();
    }

    // ecco l'errore (il file testing è nella stessa cartella del file .dat...

    Error opening URL "file:///C|/Documents%20and%20Settings/Leo/Documenti/zanzar/sitoGrafica/lay3/testSound/pippo.dat"


    //non funziona neppure se cambio .dat in .mp3 o se cambio cartella...

    AIUUTO!

  5. #5

    se posso suggerirti questo script:
    //Start creating a sound object:
    var mySound = new Sound();
    //variabile sound=crea un nuovo suono
    mySound.loadSound("http:www.nometuosito.com/pippo.mp3", true);
    //carica il file mp3 in modalità streaming, se lasci true
    var bytesTotal = mySound.getBytesTotal();

    this.onEnterFrame = function() {


    bytesLoaded = mySound.getBytesLoaded();


    if (((bytesLoaded/bytesLoaded)*100) == 30) {

    //dopo circa il 30 % del file caricato parte la musica
    //puoi cambiarlo se vuoi, metti anche 5 o 10 %
    mySound.start();
    }
    };



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.