Translate

> > Load Movie Clip at runtime

Load Movie Clip at runtime

Posted on Tuesday, April 26, 2011 | No Comments

go to your movie clip and set following properties

 
var myMovieClip:MovieClip = new MPlayer();
    addChild(myMovieClip);
    myMovieClip.x = 10;
    myMovieClip.y =30;
    myMovieClip.Sharakuplayer.source = videoFileName;
    myMovieClip.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownDragger);
    myMovieClip.addEventListener(MouseEvent.MOUSE_UP, mouseUpDragger);
}
function mouseDownDragger(e:MouseEvent):void
{
e.currentTarget.startDrag();
}
function mouseUpDragger(e:MouseEvent):void
{
e.currentTarget.stopDrag();
}

Leave a Reply

Powered by Blogger.