[Papervision3D] Display textfield in plane in specific position (y)
Mark I. Ross
nospam at therossman.org
Wed Jun 9 10:14:21 PDT 2010
when you create a new instance of MovieMaterial you can pass a Rectangle
as the last parameter of the constructor, that will "set" the size of
the moviematerial, then your y setting should be respected (i think).
HTH,
mark
Lair Nicolas wrote:
> Hi all,
>
> I am trying to display a textfield at a specific y position in a
> plane, but I can't get it working ( See the line in bold in my example)
> I am using a CompositeMaterial to display a MovieAssetMaterial and a
> Sprite used to create the textfield.
>
> I can assign any value to the y property of the textfield ... It is
> simply ignored ( well it looks like)
>
> Do you guys have an idea why this is not working ?
>
> var material:CompositeMaterial = new CompositeMaterial();
> var movieMaterial:MovieMaterial;
> var materialSprite:Sprite = new Sprite();
> materialSprite.width = materialSprite.height = size;
> var txt:TextField = new TextField();
>
> var textFormat:TextFormat = new TextFormat("Arial",fontSize);
> textFormat.color = 0xFFFFFF;
>
> txt.defaultTextFormat = textFormat;
> txt.text = title;
> *txt.y =
> 100;
> // This does not work*
> txt.width = 500;
>
> materialSprite.addChild(txt);
> movieMaterial = new MovieMaterial(materialSprite,true,false,true);
> movieMaterial.smooth = true;
> movieMaterial.interactive = true;
>
> material.addMaterial(colorMaterial);
> material.interactive = true;
>
> Thanks in advance,
>
> --
> niko
> ------------------------------------------------------------------------
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20100609/9ee1607d/attachment.html>
More information about the Papervision3D
mailing list