Been trying to enter the simplest example in a ASP.NET user control (*.ascx) but hey, it simply will not work: --------------------- <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> var so = new SWFObject("so_tester.swf", "mymovie", "350", "175", "8", "#FFFFFF"); so.write("flashcontent"); </script> <div id="flashcontent">This is replaced by the Flash content. </div> ---------------------
All I see is the text "This is replaced by the Flash content. ".
Internet Explorer 6 just gives me that helpful message " 'null' is null or not an object".
In a user control, you'll need to insert the SWFObject code into a function and call it with an "onLoad" event in the user control's body tag.
--------------------- <body onLoad="doLoad()"> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> function doLoad() { var so = new SWFObject("so_tester.swf", "mymovie", "350", "175", "8", "#FFFFFF"); so.write("flashcontent"); } </script> <div id="flashcontent">This is replaced by the Flash content. </div> ---------------------