This is G o o g l e's cache of http://www.flashsandy.org/forum/index.php?act=Print&client=printer&f=17&t=177 as retrieved on 31 Jul 2007 19:55:36 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:-lc9GA0S41MJ:www.flashsandy.org/forum/index.php%3Fact%3DPrint%26client%3Dprinter%26f%3D17%26t%3D177+act%3DPrint+%22index+php%22+-lofiversion+site:www.flashsandy.org&hl=en&ct=clnk&cd=85


Google is neither affiliated with the authors of this page nor responsible for its content.
These search terms have been highlighted: index php 
These terms only appear in links pointing to this page: act print

Printable Version of Topic

Click here to view this topic in its original format

Sandy's Forum _ AS2 1.x versions _ Making the VideoSkin transparent

Posted by: Petit Nov 11 2006, 11:59 PM

In Sandy 0.2 there was an example of a cube with a video skin, that was made semi transparent.
Through any of the sides of the cube, you could see the other sides, playing the same video.
In Sandy 0.2, there was no explicit VideoSkin, but the TextureSkin was used, and the Video object, containig the FLV was drawn to the BitmapData object, used by the skin.

In Sandy 1.1, you send that same Video object as an argument to the constructor, and the drawing into a BitmapData object is done behind the scenes.

I am trying to use the same technique as in 0.2.With a

CODE
var ct:ColorTransform = new ColorTransform(1,1,1,1,0,0,0,-250);

I try to inject this into the texture property of the VideoSkin. I do this once every frame, by using the onRender event. Here's the relevant part of the event handler:
CODE
function videoAlpha(){
    // skin.texture.draw( video );   // Should I do this ?
    skin.texture.colorTransform(skin.texture.rectangle,ct);
}

Has something changed here since 0.2?
How do I make an FLV video transparent on a face?

Posted by: RichL Nov 13 2006, 01:54 PM

Hi Petit,

I found a way by extending VideoSkin to apply a colorTransform at the render stage.

I think the following forum topic should explain how ...(come back to me if it doesn't)

http://www.flashsandy.org/forum/index.php?showtopic=19

RichL

Posted by: Petit Nov 14 2006, 12:04 AM

Thanks RichL!

I suppose you refer to the BasicRotationCopy.fla and the extended version of the VideoSkin.
I downloaded both, and swopped in you ColorTransform aware VideoSkin in the class path.
So I run your example from within the Flash MX IDE ( and got rid of the ASO files wink.gif

Unfortunately, the video cube only shows up ro a frame or two, and then disappears.
The bitmap textured cube works okay though.

I'm using Sandy ver. 1.1. In what version did you create your example.
I think it's beautiful, and something I really want to use.




Posted by: kiroukou Nov 14 2006, 06:13 AM

Hi Petit,
Hum the disparition thing you are talking about sounds like a bug...
And as I don't like them, could you provide all your example code? (class video+main class)

This is something I should kep in mind for the next release, give the user the possibility to enble the transparent mode.... I'll try to remember this wink.gif

Thanks.

Posted by: RichL Nov 14 2006, 11:19 AM

Petit,

Try this .fla. This works in Sandy 1.1 for me (with my VideoSkin).

There is a lot of extra code in the .fla where i've tried a few things out, but you should be able to pick out which bits are currently being used.

It looks really good with the glow filter added but this makes the transparency harder to see.

RichL


Attached File(s)
Attached File  BasicRotation2.fla ( 144k ) Number of downloads: 8
Attached File  VideoSkin.txt ( 2.36k ) Number of downloads: 8

Posted by: Petit Nov 14 2006, 07:25 PM

QUOTE(kiroukou @ Nov 14 2006, 07:13 AM) *

Hi Petit,
Hum the disparition thing you are talking about sounds like a bug...
And as I don't like them, could you provide all your example code? (class video+main class)


I'll send you the files per email, and get back here if I find a solution.

Posted by: Petit Nov 14 2006, 07:40 PM

QUOTE(RichL @ Nov 14 2006, 12:19 PM) *

Petit,
Try this .fla. This works in Sandy 1.1 for me (with my VideoSkin).


Thanks RichL, you're my Hero of the Day!

It really works, with your extended VideoSkin, and I'm sure something like this will be included in future versions of Sandy.

kiroukou ?

Now I must study in detail how this is done.

Posted by: Petit Nov 14 2006, 09:11 PM

Ah, really elegant!
The ColorTransform is applied in the private __updateTexture method of the VideoSkin,
and it works beautifully.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)