i saw this on an old thread i managed to get it working but ive come across a roblem i used a 2 second fade in in the video with squeeze so all im getting is a black thumbnail
Is theyre any wy to nudge the preview in about 15 seconds without eating up bandwidth ?
heres the code on the sceen whe have an empty movieclip called Thumbnail and a video component called Screen
import flash.display.BitmapData;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
Screen.attachVideo(ns);
this.createEmptyMovieClip("temp", 666);
temp.attachAudio(ns);
var mute:Sound = new Sound(temp);
mute.setVolume(0);
ns.play("1.flv");
ns.onMetaData = function(obj) {
seekInt = setInterval(createThumbnail, 50, obj, 1);
};
function createThumbnail(obj:Object, num:Number) {
clearInterval(seekInt);
ns.pause();
var bmp:BitmapData = new BitmapData(Screen._width, Screen._height);
bmp.draw(Screen);
var Thumbnail:MovieClip = _root.createEmptyMovieClip("Thumbnail"+num, num);
Thumbnail._x = Screen._x;
Thumbnail._y = Screen._y;
Thumbnail.attachBitmap(bmp, 0, "none", true);
Thumbnail.onPress = startDrag;
Thumbnail.onRelease = stopDrag;
ns.close();
Screen._visible = false;
}