Your Moodle version

Activities: SWF-Activity-Module

Maintained by Matt Bury Matt Bury
The SWF Activity Module is a Moodle plugin for deploying multimedia Flash learning applications, also known as Flash templates, videos, and playlists.
Moodle 2.5, 2.6, 2.7, 2.8, 2.9


Uploading content for the SWF Activity Module requires FTP access to /moodledata/repository/ If you do not have FTP access, ask your IT support about setting up an account for you or giving you access to an existing account. A good free and open source FTP client is FileZilla.

What does it do?

The SWF Activity Module is a Moodle plugin for deploying multimedia Flash learning apps, also known as Flash templates. Teachers and course content developers can use the SWF Activity Module to deploy any Flash apps, including but not limited to those that use external data and media in order to function correctly. It also allows Flash apps to communicate with Moodle for purposes such as passing learners' grades into Moodle's grade book.

Why use this module?

This module is especially useful for deploying M3U (playlists), SMIL, XML, and MPEG-7 multimedia learning interactions where using Moodle's built in file management system would be impractical. Large numbers of files can be uploaded and managed via FTP clients and the module provides a system of URL linking that is predictable, so you can write them into SMIL, XML, and MPEG-7 files, and portable, so you can transfer/redistribute multimedia interactions from one Moodle to another with the minimum of time and effort. Doing any of these with Moodle's file management system, even with external repositories, requires exponentially more time and effort.

Video/Media Player

The SWF Activity Module can support a number of popular Flash based media players and comes with the JW Player 5 (not free) and the free and open source Strobe Media Player (SMP) pre-installed. The SMP is part of the Open Source Media Framework:

There are demos of the SMP in action on the SWF Activity Module demo course here: (Allows guest access).

If you would like another free and open source media player included in the SWF Activity Module standard distribution, please let me know in the comments section below.

Flash learning apps

It includes one example Flash learning app, the Concept Map app:  A word search app is also provided separately for testing and demonstration purposes. You're free to use the word search in courses if you wish. Matt Bury has a selection of Multimedia Interactive Learning Apps (MILAs) designed to assist and augment Second Language Acquisition (SLA) especially in EFL, ESL, ELF, and EAP contexts:

Sufficient documentation, source code and examples are provided on this project site so that Flash developers can easily write or adapt applications to work fully with the SWF Activity Module. See the project wiki pages for further details.


See demos of the latest version on my R&D Moodle: (Allows guest access).

Useful links

Free and open source projects compatible with the SWF Activity Module:

Other useful projects:


Screenshot #0
Screenshot #1
Screenshot #2


Matt Bury
Matt Bury (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • MD shot of me from his iphone4
    Wed, Feb 13, 2013, 4:31 PM
    Hi Matt,
    could you consider renaming README to readme.txt. otherwise its not easy to actually read it smile
  • Matt Bury
    Thu, Aug 8, 2013, 6:29 AM
    README is now a .txt file. I've also made it easier to deploy 3rd party Flash apps that require custom FlashVars for settings, loading files, consuming web services, etc.
  • Matt Bury
    Thu, Aug 8, 2013, 6:30 AM
    Latest versions are always on Github:
  • Picture of Rick Sparrow
    Fri, Sep 6, 2013, 12:27 AM
    Is this plug-in compatible with Moodle 2.4? The links on the github page seem to refer to either 1.9 or 2.5+ Thanks.
  • Matt Bury
    Fri, Sep 6, 2013, 12:34 AM
    Hi Rick,

    I put 2.5+ because that's what I'm testing it with. I don't see any reason why it shouldn't work on Moodle 2.3+ (when the File System repository was introduced).

    Please note that this module is still in beta and any updates to it require you to completely uninstall and reinstall the moodle/mod/swf/ part of the module, i.e. I'm not putting in upgrade scripts yet. This makes it unsuitable for public/production Moodles.

    Once it's in full production/public release, it'll upgrade normally like any other module.

  • Picture of Mike Coupet Toussaint
    Tue, Jan 21, 2014, 8:46 AM
    Hi Matt,
    First of all happy new year. I've been trying out your version of the SWF module for the 2.5 moodle version and its working fine. My only issue is that the function i used for the moodle 1.9 to be able to send the grades from the swf files to the moodle's gradebook doesn't work with your new version. I'd like to know what function i should include in my swf files now to be able to send the grades to moodle 2.5.

    Sincerely yours,
  • Matt Bury
    Tue, Jan 21, 2014, 10:57 AM
    Hi Mike,

    Re: pushing grades, here's the story so far:

    I chose AmfPHP as the interface with Moodle because it's powerful, flexible and easy to use. There's so much you can do with it.

    AmfPHP 1.9 still works with Moodle 2.5 and later if the server is running PHP 5.3. It doesn't work with PHP 5.4 or later.

    AmfPHP 2.1 works with PHP 5.3 and later. It also works with Moodle 2.5 with everything except that the $USER object doesn't instantiate. The $USER object is essential to do just about anything in Moodle and I can't find out why it isn't working when all the other objects; $CFG, $COURSE, etc.; are.

    So, if your server is running PHP 5.4 or later, no version AmfPHP will work with Moodle.

    In the latest version here, I've included a PHP script /moodle/mod/swf/scripts/gradeupdate.php which takes regular HTTP(S) POST and GET calls and pushes grades. It requires:

    instance (int) Moodle instance ID
    swfid (int) SWF instance ID
    rawgrade (int) 1 - 100 (fails if grade is 0)
    feedbackformat (int) Elapsed time in seconds (recorded by Flash apps). This gets concatenated to the front of feedback with ||| as a delimiter, since the gradebook doesn't have a column for elapsed time. I used to store it in the feedbackformat column but not any more. I might change the name of this to something like 'elapsedtime' or 'timeelapsed' to be more coherent and consistent.
    feedback (string) Any text you want to push into the comments/feedback column of the gradebook

    This'll have to do until the AmfPHP situation gets resolved. If this never happens, then we won't be able to do more advanced stuff so easily but at least pushing grades will work. The SWF Debugger app, which is free and open source, contains some example code for pushing grades via gradeupdate.php as well as being compatible with AmfPHP 1.9 and 2.1, if it's working:

    Just a quick reminder not to use the SWF Activity Module for 2.5+ on production sites. I'm not including upgrade scripts so each new upgrade will require you to uninstall and reinstall the module. Once everything's more or less as it should be, I can release it as 'stable' and include upgrade scripts from then on.

    I hope this helps!
  • Picture of Jim Cook
    Thu, May 1, 2014, 9:29 PM

    Great work!

    I have one observation/question... When playing a stored video, I have a green bar (appears to be the background) showing up in the bottom 1/4 of the playback window. Would like not to see that. Is there a specific size for the original video I need to use? Other thoughts? I will be glad to let you into my system to see what I am talking about if that would help.

  • Picture of Jim Cook
    Thu, May 1, 2014, 9:49 PM
    Matt, disregard my last comment. In doing a little more research I find the green line at the bottom to be part of the original file. There is nothing you can do about it.

    Thanks again for your work!

  • Matt Bury
    Fri, May 2, 2014, 2:03 AM
    Hi Jim,

    You can transcode the video file and crop off the green part while you're doing it. A good free and open source transcoder that can do this is Transcodes to MP4 (and M4V which is the same) and MKV.

    Good luck!
  • Picture of Mathew Gancarz
    Fri, Jul 4, 2014, 4:26 AM
    Hello Matt, I've been struggling a bit with getting some flash activities exported from Articulate embedded in our courses using the File resource and happened upon your plugin here. I noticed some warnings that it is not suitable for production use. Is that still the case?
  • Matt Bury
    Sat, Jul 5, 2014, 12:21 AM
    Hi Matthew,

    I haven't "officially" made it for production use but there aren't any more bugs that I know of. So far the design seems to be more or less final so it should be ready soon-ish.

    Thank you for your patience smile
  • Picture of German Valero
    Sun, Sep 7, 2014, 6:20 AM
    Hi Matt,

    This very useful plugin does not have its English strings available for translations in AMOS for the 2.6 and 2.7 branches. Only the 2.5 branch is available.

    Maybe it has a similar problem as described for the certificate plugin in the tracker CONTRIB-4946, but I am not a programmer, merely a translator.

    Thanks for your help.
  • Picture of 景東 王
    Sun, Apr 19, 2015, 4:44 PM
    Hi Matt,
    I like the swf activty in moodle 1.9,the version of moodle 1.9 can choose the swf file from course file's directory,but the version of moodle 2 can't.
    I had found the module Repositories: Course File Area which replicates the Moodle 1.x course files functionality ,would you change the full url to file-selector ? I had tried the module for your mplayer module,and modified mplayer module,it run very well.
Please login to post comments