I have a user control that will eventually dynamically embed a flash movie, but I can't get the basics to work.
I am using master pages then a home.aspx and then a user control.
Here's the code;
Expand|Select|Wrap|Line Numbers
- protected override void OnPreRender(EventArgs e) {
- base.OnPreRender(e);
- Page.ClientScript.RegisterClientScriptInclude(Parent.GetType(), "SWFobject.js", "_scripts/SWFobject.js");
- string scriptBlock =
- "<script type=\"text/javascript\" language=\"JavaScript\">" +
- "var fo = new SWFObject(\"_asset/flash/home.swf\", \"\", \"480\", \"296\", \"6\", \"#FFFFFF\");" +
- "fo.write(\"flashcontent\");" +
- "</script>";
- Page.ClientScript.RegisterClientScriptBlock(Parent.GetType(), "flashcontent", scriptBlock);
- }
But I get a null error in IE?
Any help would be appreciated.