salve,
vorrei creare un preload mentre flash carica i dati da un file in php.
C'è qualcuno che sa dirmi come faccio ad usare il metodo getBytesLoaded e getBytesTotal con loadVars?
Ho provato con questo codice(actionscript 2.0), ma come risultato di getBytesLoaded ho ottenuto "undefined". cosa c'è che non va???
graziecodice:stop(); file = 'http://www.pippo.com/pluto.php'; c = new LoadVars(); c.onLoad = function(success){ if(success){ root.mytext._visible=false; play(); } else root.mytext..text="Errore nel caricare le immagini"; } c.load(file); _root.onEnterFrame = function() { var bloaded:Number = c.getBytesLoaded(); var btotal:Number = c.getBytesTotal(); if (bloaded >= btotal) { trace("Loaded "+lvBytesLoaded+" of "+lvBytesTotal+" bytes."); _root.mytext.text = Math.round(bloaded ()/btotal()*100)+ "%" } }

Rispondi quotando