Game Development Community

video sprite

by Dan Pascal · in Torque X 2D · 12/21/2009 (12:50 pm) · 5 replies

is it possible to put video as a material on a T2DStaticSprite,
so I can assign it to a layer and have things render ontop of it, move it around etc,?
this is for tx2d




#1
12/21/2009 (6:09 pm)
I figure it would be pretty useful for a lot of people so I've posted up some bare bones code as a community resource.

www.torquepowered.com/community/resources/view/18957
#2
12/21/2009 (10:28 pm)
excellent thanks!
#3
12/22/2009 (3:36 pm)
ya I had issues with the code posted but found the problem
the code posted is missing a few important backslashes most likely lost when Duncan posted

corrected:
_video = ResourceManager.Instance.CurrentContentManager.Load<Video>(@"data\video\" + _videoAssetName);
#4
12/22/2009 (3:54 pm)
Thanks. I've updated the resource with double backslashes in the markup so that the code displays correctly now.
#5
12/22/2009 (6:09 pm)
great resource btw,
works like a charm now
exciting time for us t2d'ers