Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

Flash: diferència entre les revisions

De MoodleDocs
Salta a:navegació, cerca
Cap resum de modificació
(Working with media template)
 
(12 revisions intermèdies per 7 usuaris que no es mostren)
Línia 1: Línia 1:
{{Working with media}}{{Update}}
Flash content can easily be included in your courses.
Flash content can easily be included in your courses.


Línia 20: Línia 22:
id="myFlashId" bgcolor="#ffffff" quality="high" wmode="opaque" />
id="myFlashId" bgcolor="#ffffff" quality="high" wmode="opaque" />
</pre>
</pre>
==Insert captivate into Moodle==
See [[Adobe captivate]] for exporting a SCORM file and bringing that into Moodle.


==Insert flash into a lesson page==
==Insert flash into a lesson page==
Inserting a Flash file into a [[Lesson Pages|lesson page]] (either a branch or question page) is similar to the above.
Inserting a Flash file into a [[Lesson Pages|lesson page]] (either a content or question page) is similar to the above.
#Publish the SWF and HTML upload the SWF to a central location on your server.  
===Simple example===
#Then copy and paste the HTML code (between the object tags) and
1. Place a swf file on your server that can be found with a URL address
#place that in the HTML side of your question (switch to HTML view).
:: For example, place the file "IT_Pro.swf" in the web root. This might be in your htdocs or www folder of your webserver
# Change the value in your HTML code
2. Go to a Lesson page in edit mode. If you want text to appear above or below the flash object, place your words in the content area, then
##Example: Change this <nowiki><param name="movie" value="MyFlashFile.swf"</nowiki> to this <nowiki><param name="movie" value="http://www.myserver.com/flash_files/MyFlashFile.swf"</nowiki>
 
# Repeat the same step, but change the src instead.
3. Use the "Toggle the HTML source" icon to switch to TEXT MODE
##Example:<nowiki><embed src="http://www.myserver.com/flash_files/MyFlashFile.swf"</nowiki>
 
#Save the question
4. Paste the HTML code that will play the flash file in front or after your words (see below for an example:
: <nowiki><a href="http://localhost/IT_Pro.swf">http://localhost/IT_Pro.swf</a></nowiki>  
 
5. Set the jumps on the lesson page
 
6. Save the page.
===Example that sizes flash display window===
You can use some object code to control the display size of the swf file.  Here is some code used on a localhost to display an image in a 600x400 pixel frame in a Branch Table page.  The file is in the same location as the simple example above. 
 
TIP: This was tested in Moodle 1.9.9 . 
 
<nowiki><object height="400" width="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param value="http://localhost/IT_Pro.swf" name="movie" /> <param value="high" name="quality" /> <embed height="400" width="600" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" src="http://localhost/IT_Pro.swf" />
</object></nowiki>
 
Notice that both the file location and frame size appears 2 times in the code.  Be sure to change both for best results.
 
:TIP: You can play a swf file uploaded into your course.  For example, in the course Files, a folder Lesson01 was created and the IT_Pro.swf file place there.  By clicking on the swf file name, you should see a popup window with the playing swf file.  Copy the URL address at the top.  For example here is the URL for the file on a localhost that is located in the course Files, in a folder called "Lesson01":
:<nowiki>http://localhost/moodle199/file.php/3/Lesson01/IT_Pro.swf</nowiki>
You can plug that value into the above code to get:
:<nowiki><object height="400" width="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param value="http://localhost/moodle199/file.php/3/Lesson01/IT_Pro.swf" name="movie" /> <param value="high" name="quality" /> <embed height="400" width="600" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" src="http://localhost/moodle199/file.php/3/Lesson01/IT_Pro.swf" />
</object></nowiki>
 
===Possible code tweak needed in Lesson===
Based upon Lesson forum discussions, in Moodle 1.9.9 (and probably earlier versions),the ./mod/lesson/view.php code was tweaked so the line
format_text($page->contents, FORMAT_MOODLE, $options).
was changed to:
format_text($page->contents, FORMAT_HTML, $options).
And of course the Site administration >Modules>Filters> Manage filers "Multi media" should be active and under Multi Media Plugins "swf files" enable.


==Some external links to Flash file generating programs==
==Some external links to Flash file generating programs==
Línia 42: Línia 74:


==See also==
==See also==
*[[Flash_module]] How to install a Flash plugin module.
 
*[[Files]] for teachers
*[[Filters]] part of the administration block
*[http://moodle.org/mod/forum/discuss.php?d=37119 Multimedia plugin vs object embed] forum discussion
*[http://moodle.org/mod/forum/discuss.php?d=37119 Multimedia plugin vs object embed] forum discussion
*[http://moodle.org/mod/forum/discuss.php?d=29588 Size of embedded Flash] forum discussion
*[http://moodle.org/mod/forum/discuss.php?d=29588 Size of embedded Flash] forum discussion
*[[Development:SWF]] SWF Activity Module - A user friendly Flash embed method ideal for learning interactions
*[http://code.google.com/p/swf-activity-module/ SWF Activity Module] - A user friendly Flash embed method ideal for learning interactions also provides framework for pushing grades into Moodle's grade book
*[[FLV Player]] A user friendly Flash video embed method which also supports YouTube.com
*[http://code.google.com/p/moodle-mplayer/ Media Player module] A user friendly Flash video embed method which also supports YouTube.com and a whole host of interactive plugins
* [[Screencasts]]
* [[Screencasts]]


 
[[fr:Flash]]
[[Category:Administrator]]
[[Category:Teacher]]
 
[[ja:Flash]]
[[ja:Flash]]
[[pl:Flash]]
[[pl:Flash]]
[[ru:Flash]]
[[ru:Flash]]

Revisió de 09:34, 4 gen 2012

This page requires updating. Please do so and remove this template when finished.


Flash content can easily be included in your courses.

General instructions for insertion

If you have the filter for the Flash multimedia plugin enabled then simply linking to the file in an HTML area such as a label, HTML block or section description will also display the Flash file inline. At the moment all flash files will play at the same size site-wide by default.

You can use HTML code and the object tag to set individual movie sizes which will work with most browsers except Microsoft's Internet Explorer.

<object width="600" height="400" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=
"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">
<param name="movie" value="http://yoursite.org/file.php/2/movie.swf" />
<param name="quality" value="high" /> <embed width="600" height="400"
src="http://yoursite.org/file.php/2/movie.swf" quality="high"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>
TIP: If using the .swf filter you can control display size by adding the following parameters to the end of the link to specify size: ?d=widthxheight (for example ?d=600x400 where the image is 600 pixels wide 400 pixels high). You can use up to 3 characters for the width and the height, plus an optional % symbol at the end.
TIP: There are also other ways to achieve sizing control. See the Size of embedded Flash forum posts for some hacks.

Update 2008

The following code works in IE7 and Firefox 3:

<embed width="600" height="400" type="application/x-shockwave-flash" 
src="http://YOURSITE.com/path/to/your/swffile/swf" 
id="myFlashId" bgcolor="#ffffff" quality="high" wmode="opaque" />

Insert captivate into Moodle

See Adobe captivate for exporting a SCORM file and bringing that into Moodle.

Insert flash into a lesson page

Inserting a Flash file into a lesson page (either a content or question page) is similar to the above.

Simple example

1. Place a swf file on your server that can be found with a URL address

For example, place the file "IT_Pro.swf" in the web root. This might be in your htdocs or www folder of your webserver

2. Go to a Lesson page in edit mode. If you want text to appear above or below the flash object, place your words in the content area, then

3. Use the "Toggle the HTML source" icon to switch to TEXT MODE

4. Paste the HTML code that will play the flash file in front or after your words (see below for an example:

<a href="http://localhost/IT_Pro.swf">http://localhost/IT_Pro.swf</a>

5. Set the jumps on the lesson page

6. Save the page.

Example that sizes flash display window

You can use some object code to control the display size of the swf file. Here is some code used on a localhost to display an image in a 600x400 pixel frame in a Branch Table page. The file is in the same location as the simple example above.

TIP: This was tested in Moodle 1.9.9 .

<object height="400" width="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param value="http://localhost/IT_Pro.swf" name="movie" /> <param value="high" name="quality" /> <embed height="400" width="600" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" src="http://localhost/IT_Pro.swf" /> </object>

Notice that both the file location and frame size appears 2 times in the code. Be sure to change both for best results.

TIP: You can play a swf file uploaded into your course. For example, in the course Files, a folder Lesson01 was created and the IT_Pro.swf file place there. By clicking on the swf file name, you should see a popup window with the playing swf file. Copy the URL address at the top. For example here is the URL for the file on a localhost that is located in the course Files, in a folder called "Lesson01":
http://localhost/moodle199/file.php/3/Lesson01/IT_Pro.swf

You can plug that value into the above code to get:

<object height="400" width="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param value="http://localhost/moodle199/file.php/3/Lesson01/IT_Pro.swf" name="movie" /> <param value="high" name="quality" /> <embed height="400" width="600" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" quality="high" src="http://localhost/moodle199/file.php/3/Lesson01/IT_Pro.swf" /> </object>

Possible code tweak needed in Lesson

Based upon Lesson forum discussions, in Moodle 1.9.9 (and probably earlier versions),the ./mod/lesson/view.php code was tweaked so the line

format_text($page->contents, FORMAT_MOODLE, $options).

was changed to:

format_text($page->contents, FORMAT_HTML, $options).

And of course the Site administration >Modules>Filters> Manage filers "Multi media" should be active and under Multi Media Plugins "swf files" enable.

Some external links to Flash file generating programs

This is not a comprehensive list nor an endorsement of any product.

See also