Créer une vidéo Flash avec effet de reflet.
27 August 2006
Avec la class BitmapData on peut faire des miracle avec Flash, maintenant on va essayer d'insérer une vidéo et créer un reflet (style iChat).
code :
import flash.display.BitmapData; var nc = new NetConnection(); nc.connect(null); var ns = new NetStream(nc); videoBox.video.attachVideo(ns); //ns.play("movie.flv"); var myBitmapData = new BitmapData(videoBox._width, videoBox._height, true, 0xff0000); reflectBox.attachBitmap(myBitmapData, 1); reflectBox._yscale = -100; reflectBox._y = videoBox._y + videoBox._height*2; gradianBox._x = ref._x; reflectBox.cacheAsBitmap = true; gradianBox.cacheAsBitmap = true; reflectBox.setMask(gradianBox); this.onEnterFrame = function (){ myBitmapData.draw(videoBox); }; PlayButton.onRelease = function(){ this._visible = false; ns.play("movie.flv"); }
Download Source File : reflet video source (132)