A good question. This is what works for me >>
On the course home page (where you see all the course weeks/units) you need to make sure you have editing turned on. At the top left of the page, you'll see a button to toggle editing on and off.
On the unit/week that you want to embed your SWF, you'll see a a little editing icon (a hand holding a pen) next to or just under the unit/week title. Click on this to edit the title.
This will open the text/HTML editor window where you can put your Flash embed code. At the top right of the text/HTML window, you'll see a <> icon. Click on this to enter HTML editing mode (Moodle calls it text mode).
Copy and past this code into the window:
<div id="content"><embed width="640
" type="application/x-shockwave-flash" src="http://yourserver.com/swf/your_swf
" bgcolor="#ffffff" quality="high" wmode="transparent" /></div>
&amp;amp;quot;, &amp;amp;quot;9&amp;amp;quot;, &amp;amp;quot;#ffffff&amp;amp;quot;); so.addParam(&amp;amp;quot;wmode&amp;amp;quot;, &amp;amp;quot;transparent&amp;amp;quot;); so.write(&amp;amp;quot;content&amp;amp;quot;); </script>
This code will embed the SWF 'your_swf.swf' which is in the directory 'http://yourserver.com
/swf/' on your server
/java/', to embed the SWF into the page.
Obviously, you have to create the directories, upload
the files and edit the code above to reflect where you're really putting everything. The parts of the code in bold
are the bits you need to edit.
If you read the code closely, you'll notice that some of the information is duplicated. This is because you essentially have the same code twice. The second half is for Internet Explorer, the first half is for all other browsers, including Firefox
. You need to edit both halves of the code so that the corresponding parts in bold
are the same.
You'll also notice that the second (IE
) half is URL
encoded (i.e. looks like this: &amp;amp;quot;). For some reason, Moodle likes it this way. If you try putting regular <object> code there, it sometimes doesn't work.
I've attached a copy of swfobject.js
Oh yeah, if this doesn't work. Try looking in Moodle > Site Administration > Security > Site Policies > and make sure you've got the "Allow EMBED and OBJECT tags allowobjectembed
I hope I've covered everything. Good luck!