How do I use the HTML block to show a flash file?

How do I use the HTML block to show a flash file?

by Andy Brookes -
Number of replies: 4
hi, wonder if someone could help with a question i have, but in very easy to follow language as i'm not really confident with html and so on. i have a .swf flash file that i want to have running on my moodle course page so that the students see it whenever they visit the course main page. i've seen something called a html block. would i be able to use that? or is there a better way? e.g. can i get it to run in a label so that it appears in the main topic part of the course page rather than in a block at the edge. assuming i have already uploaded the .swf to my course page, and i know that the location is http://moodle.org/mod/forum/view.php?f=396 what exactly would i need to type in to get this to display?
many thanks for any help

Average of ratings: -
In reply to Andy Brookes

Re: How do I use the HTML block to show a flash file?

by Ray Lawrence -
Hi Andy,

Yes, either will be OK. Be careful of the size of the .swf in a block though.

You need mmmultimedia plugins enabled on the site.
Type some text to link to (can be simply a space if you dont want it to show).
Select the text, click on the "Insert web link" icon in the HTML editor toolbar and link to the file from there. Save changes and you're away...

Ray
In reply to Ray Lawrence

Re: How do I use the HTML block to show a flash file?

by Andy Brookes -
hi ray!
fancy you replying to my request for help! hope you're ok. what i really want to do, rather than create a link to the .swf file so that when clicked on it it opens in a new window, is there anyway of making the flash file open actually in the block, or in the label itself? i'm not really sure what html to use to make this happen. in fact, i don't really know what i'm doing when i talk about html at all!!

i can't remember how the html block actually works. if i type in some html into this block, is it supposed to display the web page. when i've tried this, the block just actually displays what i've typed in, including all the tags and everything, rathet than display it as an html page. is this something wrong with my moodle install?

many thx
In reply to Andy Brookes

Re: How do I use the HTML block to show a flash file?

by Matt Crosslin -
You can do this with an html block.  On your html editor, make sure you have clicked the <> icon to Toggle html source, so that you are for sure only editing the source.

You will also need the link to your swf file.  The quickest way is to create the link as listed above, and then copy the location from the source file.

Then you need to copy the following code into the html editor:


<object width="xxxx" height="xxxx" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="xxxx">
<param name="movie" value="(link to your swf file)" />
  <param name="quality" value="high" />
  <param name="bgcolor" value="#FFFFFF" />
  <param name="wmode" value="transparent" />
  <param name="menu" value="false" /><embed width="xxxx" height="xxxx" src="(link to your swf file)" quality="high" bgcolor="#FFFFFF" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" menu="false" />
  </object>

The red stuff has to be replaced with the parameters of your file.  Remeber, this will only work if you have pressed the "Toggle html Source" button, near the bottom right hand corner of the menu bar, and have loaded the swf up to Moodle.

Hope that helps.
In reply to Matt Crosslin

Re: How do I use the HTML block to show a flash file?

by Andy Brookes -
thx to ray and matt for their replies ... i've now managed to get flash files working in my course, thanks to a bit of extra help from ray. matt hit the nail on the head, i'd forgotten about the toggle html source icon, and that's why it wasn't working for me!!

thanks again! smile