Créer une vidéo Flash avec effet de reflet.

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).

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");
        }

Demo

                                

Download source file

Commentaires

  • posté par : arno, le : 2006-11-18 05:05:27

    je t'adore

  • posté par : dadoo, le : 2007-03-12 04:52:02

    Merci c’est ce que je recherchais.
    Bravo

  • posté par : mat, le : 2007-07-23 07:32:44

    thx mec… c vraiment classe !!!

  • posté par : PomDesign, le : 2007-08-06 16:18:04

    bonsoir j’aurais juste voulue savoir si vous aviez un p’tit tuto car je suis un peu perdue
    Merci à vous :)

  • posté par : BLALBLA, le : 2008-01-06 11:09:47

    OK…

  • posté par : oho, le : 2008-02-14 12:00:34

    c’est qoi sa

Posté un nouveau message