transparency in swf in vb.net
how can i control swf background transparency in vb.net.........either with flash.ocx or if there is any other way....开发者_StackOverflow...so that if i have a swf animation block with red in background and some text written with yellow.......now how can i remove that red background in vb.net...actually i want to make a system so that i can choose any color as transparency key for swf.........like in tv channels logos.......etc
I'm afraid you simply cannot. The Flash file will always play over everything else, and is ignorant (more or less) of things outside of it.
It is the nature of having such a rigidly seperated third party content format and player.
Sorry to be the bearer of bad news :(
If your swf truly has a transparent background and you're playing it over a solid-colored surface you can set the container AxShowwaveFlash's BGColor
to be the same as the background. For instance, if you've got a swf called AxShockwaveFlash1
playing on top of a standard VB.Net form you can use this code:
Me.AxShockwaveFlash1.BGColor = Me.BackColor.R.ToString("X2") & Me.BackColor.G.ToString("X2") & Me.BackColor.B.ToString("X2")
Set the property BGColor 0f your Shockwave flash object to "F0F0F0"
example: your Shockwave flash object name is AxShockwaveFlash1
AxShockwaveFlash1.BGColor="F0F0F0"
精彩评论