PDA

View Full Version : Flash Wrapper?


iceman
6th of November 2006 (Mon), 17:36
I have a few Flash Videos to display, is this what the Flash Wrapper Viewerstyle is used for. How do I use it?

Thanks,

Pekka
8th of November 2006 (Wed), 15:33
You select the viewerstyle for each photo's each size path in photo editor, and there you can also upload the file to the size path.

I'm not familiar with Flash Video, the included viewerstyle might work for static files only. You can make the Flash Video viewerstyle quite easily if you have the embedded html code for it.

iceman
8th of November 2006 (Wed), 17:04
I'll give it a try, Thanks Pekka

Pekka
23rd of November 2006 (Thu), 09:18
Here's one good flash movie viewerstyle:

Save this as "viewerstyles/VIEWERSTYLE_flash_movie.php":

<?php
// FLASH IMAGE VIEWER WITH ALTERNATIVE CONTENT for EE 2.0 from http://www.dgx.cz/trine/item/how-to-correctly-insert-a-flash-into-xhtml
if (isset($photo)) {
?><!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="<?php print @$url; ?>" width="<?php print @$image_width; ?>" height="<?php print @$image_height; ?>">
<!-- <![endif]-->

<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="<?php print @$image_width; ?>" height="<?php print @$image_height; ?>">
<param name="movie" value="<?php print @$url; ?>" />
<!--><!---->
<param name="loop" value="true" />
<param name="menu" value="false" />

<img src="<?php print @$VAR_cannotplay_url; ?>" width="<?php print @$VAR_cannotplay_width; ?>" height="<?php print @$VAR_cannotplay_height; ?>">
</object>
<!-- <![endif]--><?php
}
?>


Then add a new viewerstyle:

NAME: Flash Movie Player
VIEWERSTYLE FILENAME: VIEWERSTYLE_flash_movie.php
LOAD EXTENSION: swf

Add three custom variables:

VAR_cannotplay_url
VAR_cannotplay_width
VAR_cannotplay_height

Those three variables define an image which is displayed in case flash is not available.

To upload a movie:

Open photo editor, browse to the photo you want to add the movie to. Then add/edit a size path with settings:

Upload (and replace with) file...: (browse to the swf movie file)
...using resize method: NONE

Viewerstyle: Flash Movie Player (extension swf)

Then click SAVE CHANGES TO SIZE PATHS. EE will now upload the swf file to size path and assign correct viewerstyle. You will need to type movie width and height in size path info manually, as that info is taken from respective jpg file on that same size path. If you want to change the alternative image for each movie, enable custom variables for that.

iceman
24th of November 2006 (Fri), 20:41
Great, thanks Pekka, I'll give it a try.

wkitty42
26th of November 2006 (Sun), 18:38
would this also work for .FLV files? oh, and quicktime MOVs, too... i've one or two that i've saved and haven't been able to load and view...

Pekka
26th of November 2006 (Sun), 20:01
If the same embedded code accepts different file formats, you'll need only to copy a viewerstyle and set it to use a different file extension. But in reality most formats require their own embedding html code.

So, if you find html to display embedded .FLV you can do a viewerstyle of it. Same goes for Quicktime and VRML etc.

I would love to find those for you but this week is really busy.

wkitty42
26th of November 2006 (Sun), 20:20
thanks, pekka... i actually whacked on the posted code along with some stuff from apple's site and came up with the following (rough) code... i added the "autoplay" param to what you had posted... it seems to work ok at this juncture... i still have to create my own versions of the "can't play" pic but this does work for MOV files from within IE6 and FF 1.0.5.8...

<?php
// MOV IMAGE VIEWER WITH ALTERNATIVE CONTENT for EE 2.0
// modified by wkitty42 for QuickTime MOVs from http://www.dgx.cz/trine/item/how-to-correctly-insert-a-flash-into-xhtml
if (isset($photo)) {
?><!--[if !IE]> -->
<object type="video/quicktime"
data="<?php print @$url; ?>" width="<?php print @$image_width; ?>" height="<?php print @$image_height; ?>">
<!-- <![endif]-->

<!--[if IE]>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"
width="<?php print @$image_width; ?>" height="<?php print @$image_height; ?>">
<param name="src" value="<?php print @$url; ?>" />
<!--><!---->
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="autoplay" value="false" />

<img src="<?php print @$VAR_cannotplay_url; ?>" width="<?php print @$VAR_cannotplay_width; ?>" height="<?php print @$VAR_cannotplay_height; ?>">
</object>
<!-- <![endif]--><?php
}
?>

SuperFly
14th of January 2008 (Mon), 13:44
wkitty42 - do you have a site where i can see what this stuff looks like in EE?

Thanks.