News:

Wondering if this will always be free?  See why free is better.

Main Menu

[Tip/Trick] Transparent Embedded Flash

Started by ディン1031, December 04, 2007, 01:21:40 AM

Previous topic - Next topic

ディン1031

Question: How to make the backgroud of the Flash Transparent

This small change is for user who like to change the background of the embedded Flash to transparenz, so that it looks a little bit better in the forum.

$sourcedir/Subs.php

Serach for

'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),


Replace it with

'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="wmode" value="transparent"><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" wmode="transparent" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" wmode="transparent" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),


Hope it's usefull for some people ;).

Ah and it will not work in each browser, some browser do not support this.

Bye
DIN1031


Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Daniel15

Thanks for posting this, it'd definitely be useful for some users :)

Unfortunately some Flash animations do not display correctly with the window mode set to "transparent", because they rely on the background colour of the Flash animation (I write a "Flash Embed" application for Facebook, and had some users complaining about this). I guess the best solution is to add another parameter so you can do something like [flash width=550 height=400 transparent=true]http://....[/flash] or [flash width=550 height=400 wmode=transparent]http://....[/flash], but unfortunately I don't have time to look into this at the moment (I guess it'd be easy, though).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

speider

Biz ingilizce öğrenene kadar sen Türkçe öğren bakalım...:)

Çok işime yaradı bu kod. Bilgi için tşkler :)

speider

AfroSamurai

#3
Quote from: Daniel15 on December 04, 2007, 07:07:14 AM
Thanks for posting this, it'd definitely be useful for some users :)

Unfortunately some Flash animations do not display correctly with the window mode set to "transparent", because they rely on the background colour of the Flash animation (I write a "Flash Embed" application for Facebook, and had some users complaining about this). I guess the best solution is to add another parameter so you can do something like [flash width=550 height=400 transparent=true]http://....[/flash] or [flash width=550 height=400 wmode=transparent]http://....[/flash], but unfortunately I don't have time to look into this at the moment (I guess it'd be easy, though).

That would be good indeed to modify the parameters to be able to choose between transparent canvas or opaque ones. Something (like I've mentioned in an other topic) that would look like this:

[flash=400,60,0]http://....../folder/swfname.swf[/flash] (with the variable "0" after the sizes)
Would show the Flash normally, with an opaque background (the color of the Flash canvas)

and

[flash=400,60,1]http://....../folder/swfname.swf[/flash] (with the variable "1" after the sizes)
Would show the Flash with a transparent background (Flash canvas color would not show)

Thanks in advance to take a look into this... and keep up the great work DIN1031... Your the man! 8)

AfroSamurai


rummie

btw, the Nintendo WII browser does NOT currently support WMOD=TRANSPARENT - it also chokes when you have too much embedded items, so its best to be aware of that too, and always have a BACKGROUND COLOR defined, even if you hardly expect it to be seen.

ディン1031

Quote from: rummie on December 18, 2007, 03:35:46 PM
btw, the Nintendo WII browser does NOT currently support WMOD=TRANSPARENT - it also chokes when you have too much embedded items, so its best to be aware of that too, and always have a BACKGROUND COLOR defined, even if you hardly expect it to be seen.
Like i said it -> Ah and it will not work in each browser, some browser do not support this. ;)

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

AfroSamurai

Hi DIN1031,

Is it possible for you to arrange something like I've mentioned here?
http://www.simplemachines.org/community/index.php?topic=209098.msg1330888#msg1330888

Thanks in advance! ;) :)

Bye
AfroSamurai.

ディン1031

Possible is everything... but i've no time to do it. :x

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

AfroSamurai

ARGH!  :'( To bad!

It's OK... let us know when you will have time fiend! ;) Or hey!... if someone else has the ability to achieve this and is willing to do it, I'm pretty sure that a lot of people would like this BBcode option for Flash canvas transparency.

Thanks very much in advance! ;D

Bye!

Afro.

Advertisement: