Hi JJ,
I've created following test and it's working on my side:
1) ClassLibrary1.Class1:
[assembly: WebResourceAttribute("ClassLibrary1.flash1.swf",
"application/x-shockwave-flash")]
namespace ClassLibrary1
{
public class Class1 : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
string template = @"<OBJECT
CLASSID='clsid
27CDB6E-AE6D-11cf-96B8-444553540000' WIDTH='400'
HEIGHT='320'
CODEBASE='
http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0
,0'>
<PARAM NAME=movie VALUE='{0}'>
<PARAM NAME=play VALUE=true>
<PARAM NAME=loop VALUE=false>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=quality VALUE=low>
<EMBED SRC='temp.swf' WIDTH=400 HEIGHT=320 quality=low loop=false
wmode=transparent TYPE='application/x-shockwave-flash'
PLUGINSPAGE='
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash'>
</EMBED>
</OBJECT>";
writer.Write(string.Format(template,
Page.ClientScript.GetWebResourceUrl(this.GetType(),
"ClassLibrary1.flash1.swf")));
}
}
}
2) Remember to add flash1.swf into the root folder of the class library and
configure its build action as "Embedded Resource"
Regards,
Walter Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.