The LzSprite class is dynamic in swf9, so you can add a property, i.e.,
this.sprite['__LZvideo'] = yourvideoobject
this.sprite.addChild(yourvideobject)

I don't recall any specific FLEX API for accessing named DisplayObject
children, but I could be wrong.


On Fri, Aug 8, 2008 at 6:16 PM, Raju Bitter
<[EMAIL PROTECTED]>wrote:

> Hi all,
>
> In videoview I need to replace the following functionality for SWF9:
>
> mc = this.immediateparent.sprite.attachResourceToChildView("__LZvideo",
> this.sprite);
> this.sprite.setMovieClip(mc);
>
> For SWF9, instead of attaching a movieclip to sprite we need create a Video
> object. I can attach that to the sprite using sprite.addChild, but what I'm
> missing is the functionality to attach it using the property name
> __Lzvideo.
>
> if ($swf8) {
>  // no other subviews should be allowed (todo: schema)
>
>  mc = this.immediateparent.sprite.attachResourceToChildView("__LZvideo",
> this.sprite);
>  this.sprite.setMovieClip(mc);
> } else if ($swf9) {
>  var vid = new Video(width = this.width, height = this.height);
>
>  vid.attachNetStream(this.stream);
>
>  this.stream.play(this.url);
>
>  this.sprite.addChild(vid);
> }
>
> In the method _getflashvideo() the __LZvideo property for for the movieclip
> is accessed again:
> function _getflashvideo () {
>  return this.__LZmovieClipRef.__lzvideo;
> }
>
> Is there a way to add a child to a sprite in SWF9 using a property name
> like
> "__LZvideo"?
>
> Thanks,
> Raju
>
>
>


-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to