|
Cookbook /
FlashSummary: Embedding Flash movies
Version: 2006-10-28
Prerequisites: pmwiki-2.1.19
Status: stable
Maintainer:
The flash.phpΔ file attached to this page appears to be corrupted. However, the swf.phpΔ file offers the same syntax very strange: I tried uploading a working version that I had locally stored, and the version on the server remains corrupted; perhaps the file's permissions need to be adjusted? shi March 19, 2008, at 07:38 PM QuestionCan Flash (*.swf) movies be embedded into wiki pages? AnswerUse either swf.phpΔ (below) or flash.phpΔ (further down) to enable flash files. Place the swf.phpΔ script in your cookbook/ directory, add the line include_once('cookbook/swf.php');
to your config.php file, and any link ending in ".swf" will automatically be converted to HTML code for an embedded Flash animation. The swf.phpΔ script uses a reduced Twice Cooked method and causes links ending in ".swf" to be converted to embedded Flash movies (similar to how images are automatically embedded into pages). In addition, the For Example use: DiscussionNote: the swf.php script is using the Flash 6 player (applets generated with Flash MX). For MX2004 and later (or earlier, if you're using some obsolete Flash features), you'd have to alter the $SwfTagFmt string to fit html generated by that version of Flash (or AfterShock). -Radu
When I try using an absolute URL to an swf file, the height and width don't seem to work. It will wrap the object tag with a span of the specified height and width, but it won't put the height and width into the object tag itself. -bdk?
Here is an informative blog entry for standards compliant flash. Alternative
include_once("
Width and height are optional. Setting $EnableExternalResource = 0; will disable use of syntax 2, i.e. only uploaded flash animations can be shown, not externally linked ones. ~HansB
flash.php External Data Issue
for instance, this doesn't work (presuming flashfile is uploaded to a different group on the same site)
but this DOES work with the absolute address:
YouTube, Flickr Video, Google Video, and VimeoThe same general method can be used to embed YouTube, Google Video, Flickr, and Vimeo videos. swf-sites.phpΔ can be installed into the cookbook and add the following to config.php
include_once("Then use (:youtube whatever:) markup where "whatever" is the funny unique code for the movie. So if your movie's url is then you enter
While the code for swf-sites.php is XHTML 1.0 compliant, you might find that you have trouble displaying in some browsers. In this case, you might want to try swf-sites2.phpΔ by Byron Lunz. Flickr works differently because there are extra arguments. For Flickr, you need to extract the video id and the video secret from Flickr's embed page for that video. They are contained in the suggested embed code. Then you do TeacherTubeFor TeacherTube , use teachertube.phpΔ and add the following to config.php include_once("Put in the unique ID for the movie, not the whole URL, something like (:teachertube 7f89ddbebc2ac9128303:) SlideShareFor SlideShare , use slideshare.phpΔ and add the following to config.php include_once("
(:slideshare what-is-web-20-1194363300579044-4:) GodTubeFor godTube , use godtube.phpΔ and add the following to config.php include_once("Put in the unique ID for the movie, not the whole URL, something like (:godtube flvideo1/20/17395:) or (:godtube flvideo/ 4ee3524ccf035d35b284/1650:) Working example(approve links) Updates
Contributors
SandboxThis recipe has been enabled on this page.
|