The Macromedia sound files.

The Macromedia sound files.

by henny jellema -
Number of replies: 18
Beste Gordon,

I wrote in the other message that your Macromedia code was so perfect. I am afraid I have sheered too early, because it’s suddenly not working anymore. Not on my computer off-line, but also in exercises which are working already for weeks on the internet. Which is very strange, isn't it?

This happens in Moodle:
http://lesnet.minkema.nl/elo/moodletest/mod/hotpot/view.php?id=86

as you notice maybe, the page doesn’t even open.

And also on my own website:

http://www.hennyjellema.nl/bedankt/danslemagasin1.htm

Until last Saterday it worked normally.

I looked at the site of Macromedia, but didn't read anything particular about changing the plug-in or so.
Can it be that I have been ( without knowing it) working with a program that was for 30 days free or so? And that I have to pay now. ( Which I find reasonable, as long as the price is reasonable. )
But then still I do not understand why áll the files ( the Moodled and the non-Moodled ) already uploaded on the web, are disabled.

Yours are working normally?

Hartelijke groeten van Henny.
Average of ratings: -
In reply to henny jellema

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Dear Henny,
sorry to take a while to get back to you on this problem.

The media player in hte quizzes seem to display OK on IE, but not on Firefox. This is because Firefox requires <embed> tags inside the <object> tag which define the media player

I'm sorry I didn't fully understand this point before, so I gave you incomplete information in an earlier post:
http://moodle.org/mod/forum/discuss.php?d=26360&parent=124417

The complete code required to add the Moodle media player is as follows:

<object class="mediaplugin mp3" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="90" height="15" id="mp3player"> <param name="movie" value="http://lesnet.minkema.nl/elo/moodletest/filter/mediaplugin/mp3player.swf?src=my-sound-file.mp3" /> <param name="quality" value="high" /> <param name="bgcolor" value="#333333" /> <param name="flashvars" value="waitForPlay=yes" /><embed src="http://lesnet.minkema.nl/elo/moodletest/filter/mediaplugin/mp3player.swf?src=my-sound-file.mp3" quality="high" bgcolor="#333333" width="90" height="15" name="mp3player" type="application/x-shockwave-flash"  flashvars="waitForPlay=yes"  pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>

I had to change the "hotpot/lib.php" script to look for URLs in <embed> tag, so to get the quizzes working on Firefox, it will also be necessary to ask Rob D. to install the latest Hotpot v2.1.4 from the Moodle CVS, or from my server:
http://bateson.kanazawa-gu.ac.jp/moodle/hotpot-module.2.1.x.zip

One final point, your quizzes seem to require the following images, but they don't seem to be in the directory where the quizzes are:
  • smiley_clap.gif
  • smiley_crying_2.gif
best regards and many thanks for reporting this problem
Gordon
In reply to henny jellema

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Henny,
I have modified the media players tags in your quizzes so that they work in Firefox as well now (using Hotpot v2.1.4 on your Moodle site).

I zipped all the files on your server, downloaded them to my machine and unzipped them all on my local hard disk. Then using DreamWeaver, I did a "search and replace" using regular expressions to modify all the <object> tags. There were 289 modifications in 17 documents. Finally I zipped up the files, uploaded them to your server and unzipped them there, overwriting the old quiz files.

Here are the DreamWeaver settings I used ...

Find in:
Selected files in site

Search:
Source code

Find:
<object class="mediaplugin mp3".*?>.*?<param name="movie" value="(.*?)\?src=(.*?)".*?>.*?</object>

Replace:
<object class="mediaplugin mp3" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="90" height="15" id="mp3player"><param name="movie" value="$1?src=$2" /><param name="quality" value="high" /><param name="bgcolor" value="#333333" /><param name="flashvars" value="waitForPlay=yes" /><embed src="$1?src=$2" quality="high" bgcolor="#333333" width="90" height="15" name="mp3player" type="application/x-shockwave-flash"  flashvars="waitForPlay=yes"  pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>

Options:
  • Match case: OFF
  • Ignore whitespace: OFF
  • Use regular expression: ON
I have written the regular expression patterns so that they should work for other people on other sites. If anybody reading this message intends to use these expressions, please be sure to take backups of your files before doing the search-and-replace, in case anything unexpected occurs smile

all the best
Gordon

P.S. I also copied the "smiley" and "crying" images to the same folder as the "enville" quizzes
In reply to Gordon Bateson

Re: The Macromedia sound files.

by Paola Pippia -
Hi Gordon!
I created an exercice using these expressions.
It all works perfectly! grande sorriso
Thank you,
Paola
In reply to Paola Pippia

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Thanks for the feedback Paola. Good to know things are going well for you smile
all the best
Gordon
In reply to Gordon Bateson

Re: The Macromedia sound files.

by Eric Hagley -
Gordon, again, thank you for your continued wonderful work with the hotpot module. I know you are busy working on the moodle for mobiles project, but I was wondering if it were possible to play macromedia/ multimedia files in the moodle navigation bar or frame? Doing so would allow students to scroll through the questions whilst being able to keep the media files in view. I know you can do this with the purchased version of hotpotatoes but the extra fields make the screen a little messsy. If it were possible I would like to know how.
Thanks in advance,
Eric
In reply to Eric Hagley

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Eric,
many thanks for your kind appreciation.

Regarding the "always visible media player", I wonder if it would be possible to float the player in the browser window/frame by adding to the following <DIV> tags around the the media player?

<DIV style="float:right">
    <!-- media player goes in here -->
</DIV>

That's the quickest solution I can think of at the moment.

Please let us know how you get on smile

cheers
Gordon


In reply to Gordon Bateson

Re: The Macromedia sound files.

by Eric Hagley -
I tried the above but it only seemed to put the media file on the right hand side of the quiz. It did not "float". It was an improvement but it would be great if it did "float". Thank you very much for your continued assistance.
All the best,
Eric
In reply to Eric Hagley

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

I would like to see the page. Can you let me in to your Moodle site? OR send a copy of the page to me at: gordon at-sign kanazawa hyphen ac dot jp

cheers
Gordon

In reply to Gordon Bateson

Re: The Macromedia sound files.

by Paola Pippia -
Hi Gordon,
does the Moodle media player only work on the latest 2.1.4. version of HotPot module or does it even work on the previous one? arrossito
Thank you,
Paola
In reply to Paola Pippia

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Paola,
the Moodle media player should work with ALL versions of the HotPot module.

Are you having problems?

Gordon

In reply to Gordon Bateson

Re: The Macromedia sound files.

by Paola Pippia -
Hi Gordon,
unfortunately yes;
I was not able to hear any sound installed on the following:
http://moodle.org/mod/hotpot/view.php?id=5602
However, the same files seem to be heard by other people.

Anyway on my website (V1.5) I could open and listen to them properly when in remote, whereas, opening them locally or in the page below they don't work at all on my computer.

I thank you in advance, one more time...smile

P.
In reply to Paola Pippia

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Paola,
thanks for reporting the problem with sound files in FireFox.

The problem was caused because HotPot v2.0.9, which is part of Moodle 1.5, does not correctly adjust the relative URLs in the <EMBED> tags in a quiz. As a result, the sound files in some quizzes did not play in Firefox. However, the same sound files did play in IE, because the relative URLs in <OBJECT> tags, which IE uses, were adjusted correctly by the HotPot module.

I fixed the code in HotPot v2.0, tested it, and then uploaded it to the Moodle CVS. The new version number is HotPot v2.0.10. A zip version of the the amended script is attached to this message.

For others reading this message, please note that if you are using HotPot v2.1 you DO NOT NEED TO INSTALL THE ATTACHED SCRIPT, because HotPot v2.1 already handles relative URLs in <EMBED> tags correctly.

best regards
Gordon
In reply to Gordon Bateson

Re: The Macromedia sound files.

by Timothy Takemoto -

As mentioned before, I was thinking of making the clue button play audio in a JCLOZE.

If I use the file here on my 1.5.3 will it embed flash players for me??!
I am just about to try it now.

I decided against using any of the buttons. The advantage of using the buttons is that it records how many times the students used the audio but that is not really necessary. I just embedded the MP3 from the instructions of the close, linked to a gifaudiolike this.

I plopped the "lib.php" into my 1.5.3+ installation and the cloze was created but there was no file.

Tim

In reply to Timothy Takemoto

Re: The Macromedia sound files.

by Timothy Takemoto -
That is interesting. The media player is dispayed, but the audio does not play. It works fine in windows media player.
In reply to Timothy Takemoto

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Tim,
I have modified the "01_A.htm" file on your site to display the Moodle media player and play the mp3 using that.

The HTML tags I inserted into your quiz were the <OBJECT>...</OBJECT> tags given earlier in this thread. However, I made the following two adjustments:
  • I gave the path to the moodle media player on your site
  • I specified the path to the sound file as an absolute URL, because the sound file is not in the course files folder, it is in the site files folder. If the sound file had been in the course files folder, it would have been possible to use a relative URL
The quiz seems to be working nicely now. Please try it out smile

cheers
Gordon

In reply to Gordon Bateson

Re: The Macromedia sound files.

by Timothy Takemoto -

Thanks Gordon,

It is working perfectly. Wow.

Does this mean that I will have to to use the <OBJECT>...</OBJECT> tags by editing all the hltml files? I have made 16 of these, so filtering would be great but...it would not take that long to make them all again. Or perhaps just give up on players for the first ones.

I put the audio in site files becuase there are a lot of courses using the same audio and it did not make seem to sense to add the audio to all the course files.
The bigger problem is that some of the audio files do not play. I have no idea why.

Tim

In reply to Timothy Takemoto

Re: The Macromedia sound files.

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Tim,
a number of programs have a search and replace function that you can use on several files or folders at once. For example, I would use DreamWeaver to change all the links in the quiz files to media players i.e. <OBJECT> tags

Another option would be to open each quiz with JCloze on your PC, select "media object" on the "insert" menu, and add at least one media player. Then upload the quiz files to Moodle and you should get the result you want. If you don't like the player that gets inserted, you can set "Force media player" to "Yes" for that quiz and the HotPot module will make sure that the Moodle media player is used instead of the one that Hot Potatoes inserts.

There is a third possibility - just wait smile, because as you may know, I intend to add the functionality to send the HotPot quizzes through the Moodle filters. Probably I will do this in the next couple of months. Certainly, it is near the top of the HotPot wish list

all the best
Gordon
In reply to Gordon Bateson

Re: The Macromedia sound files.

by Timothy Takemoto -

Thanks Gordon,

I am not confident with grepping and replacing but the second option sounds good. Or I may wait in hope.

The wish list looks dreamy.

Tim