Wie kann ich die Tiefe (Ebene position) ein Flash-Video?

Ich würde gerne ein video-Objekt über eine movieClip Instanz"mc"), aber unter einem anderen movieClip-Instanz ("mc_top").

Ich instanziiert, das auf _root.flashVid Objekt, indem Sie eine "Neue Video..." aus der Bibliothek auf die Bühne, und geben Sie Ihr den Instanznamen "flashVid".

Erstelle ich mc, dann malen Sie ein blaues Feld, dann Erzeuge ich mc_top, und malen Sie eine gelbe box. Das flashVid-Instanz auf der Bühne (_root) von Anfang an. Wie bekomme ich nun das flashVid über "mc", aber unten "mc_top"?

//Create movieclips and paint boxes.
var mc:MovieClip = _root.createEmptyMovieClip("test", 
                                              _root.getNextHighestDepth());

mc.beginFill(0x0000ff, 50);
mc.lineStyle(2, 0x0000ff, 100);
mc.moveTo(0,0);
mc.lineTo(400, 0);
mc.lineTo(400,400);
mc.lineTo(0,400);
mc.lineTo(0,0);
mc.endFill();

var mc_top:MovieClip = mc.createEmptyMovieClip("test_top", 
                                               mc.getNextHighestDepth());
mc_top._x = 200;
mc_top.beginFill(0xffff00, 50);
mc_top.lineStyle(2, 0xffff00, 100);
mc_top.moveTo(0,0);
mc_top.lineTo(400, 0);
mc_top.lineTo(400,400);
mc_top.lineTo(0,400);
mc_top.lineTo(0,0);
mc_top.endFill();

//Flash video code (using Video object on stage, no components)
var nc = new NetConnection();
nc.connect(null);
var ns = new NetStream(nc);
ns.play("http://dl.getdropbox.com/u/295386/Stormpulse/my.flv");

//Tell flashVid to play what's coming through the netstream.
_root.flashVid.attachVideo(ns);

InformationsquelleAutor Matthew Wensing | 2009-06-04

Schreibe einen Kommentar