Ora mi da un altro errore legato all'import:
1172: Definition fl.video:VideoEvent could not be found.
Allego tutto il codice, magari ho fatto qualche ca...volata in giro!
codice:
import fl.video.VideoEvent
parametri['video'] = 'test.flv';
// -------------------------------------------------
// Settaggi video
// -------------------------------------------------
// Connessione
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
// Creazione cornice
var filmato:Video = new Video(300, 240);
this.addChild(filmato);
filmato.attachNetStream(ns);
filmato.smoothing = true;
filmato.x = 685;
filmato.y = 10;
ns.play(parametri['video']);
// Listener stato
ns.addEventListener(NetStatusEvent.NET_STATUS, netstat);
function netstat(stats:NetStatusEvent)
{
trace(stats.info.code);
}
// Listener scorrimento
ns.addEventListener(VideoEvent.PLAYHEAD_UPDATE, funzAssoc);
function funzAssoc(stato:VideoEvent)
{
trace(stato.PlayheadTime);
}
// Meta
var netClient:Object = new Object();
netClient.onMetaData = function(meta:Object)
{
trace(meta.duration);
};
ns.client = netClient;
Forse l'errore è dovuto al fatto che il mio filmato è di tipo "Video" piuttosto che "VideoPlayer" o "FLVPlayback"?