Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

SWF: Difference between revisions

From MoodleDocs
Line 3: Line 3:
This page relates to the SWF Activity Module which is currently under development.
This page relates to the SWF Activity Module which is currently under development.


The current Beta version is available here: [http://matbury.com/assets/SWF.zip SWF.zip]
The current Beta version is available here: [http://matbury.com/assets/SWF.zip SWF.zip] Uploaded 28th January 2009


==What is the SWF Activity Module?==
==What is the SWF Activity Module?==

Revision as of 11:11, 28 January 2009

SWF Activity Module

This page relates to the SWF Activity Module which is currently under development.

The current Beta version is available here: SWF.zip Uploaded 28th January 2009

What is the SWF Activity Module?

The SWF Activity Module provides a comprehensive and flexible method for deploying SWF (Flash and Flex) files as learning interactions in a Moodle course.

How does is work?

Once installed, select SWF from an "Add an activity" list on a Moodle course page. The standard "Adding a new SWF to topic... " moodleform will appear. In this form you can set the following parameters:

Required Parameters

The required parameters are:

  • As with all Moodle activities, name and intro.
  • SWF file
  • Height
  • Width
  • Version

Optional Parameters

  • AMF Interaction (Not yet implemented)
  • XML file URL
  • FlashVars #1
  • FlashVars #2
  • FlashVars #3


Advanced Parameters

  • API Key
  • Align
  • Auto Play
  • Loop Playback
  • Menu
  • Quality
  • Scale Mode
  • Stage Align
  • Window Mode
  • Background
  • Use Device Font
  • Seamless Tabbing
  • Allow Full Screen
  • Allow Script Access
  • Allow Networking


What features does it support?

The SWF Activity Module automatically provides a deployed SWF learning activity application with the following data:

  • gateway - URL to gateway script for access to AMFPHP service library
  • amftable - table name to retrieve learning interaction data from
  • course - the current Moodle course that the user is accessing
  • instance - Instance ID of the module // not working in Moodle 1.9
  • swfid - The ID of the SWF learning activity application
  • interaction - The ID of the SWF learning interaction to consume
  • moodledata - The URL to access the current moodledata course directory (file.php)

It also supports a number of features, specific to Flash and Flex applications. They are:

Flash Remoting (AMF)

Flash Remoting is a method for Flash or Flex applications to communicate directly with server-side applications written in .NET, Java, PHP, Cold Fusion and Ruby on Rails. There are a number of open-source libraries for handling communication via Flash Remoting:

See AMF3 for details on how to set up AMFPHP in Moodle and more information about Flash Remoting technologies.

XML Data Loading

XML is currently the most commonly used format for providing elearning data for learning interactions. The most commonly used format is IMS's standard QTI (Question and Test Interoperability specification) but basically any valid XML file with the appropriate data tree structure can be loaded into and consumed by a SWF file.

FlashVars

FlashVars is a method for passing string data into a SWF file. It is passed in from the printed HTML page that the SWF file is embedded in. It's ideally suited to very simple data sets such a vocabulary lists or series of numerical values. For learning activities such as hangman, crosswords, word searches, etc., FlashVars is simple, efficient and easy to use.