Forums / Setup & design / Display Flash file with multiple related flash files

Display Flash file with multiple related flash files

Author Message

Anthony Tay

Sunday 18 February 2007 6:55:48 am

Hi,

I have one main Flash file and this main Flash file will look for a few other flash files in the same directory for display or look for another file say a video file (with .flv extension) How can this be done?

Thank you
Regards

Softriva .com

Monday 19 February 2007 11:34:07 am

I think this can be done like how you do your image background in css. Look at this css code

background:url(../images/box-bg.png) no-repeat top; 

I am going up one directory then to my image directory.

if they all reside in the same directory, just use the name directly.

Anthony Tay

Monday 19 February 2007 8:33:12 pm

Hi,

Actually, I wanted to manage the swf files from ezPublish rather than directly putting the flash files in the images directory. So the set of swf files should be uploaded via the ezPublish admin module.
Btw, I was able to display the main flash file using the following statement:
{def $mynode=fetch(content,node,hash(node_id,405))}
{attribute_view_gui attribute=$mynode.object.data_map.media}

But the related flash files was not downloaded in the cache so it was not displayed.

Regards

Łukasz Serwatka

Monday 19 February 2007 11:50:09 pm

Hi Anthony,

There are 2 ways, easy and quick but not flexible at all, and more complex but with usage of contentobjects for all files.

1.

You can make a dummy node, then make a node template override for it and in template display your movie. Code in template will refer to your movie located on file system (in e.g var/storage or images/flash). You will need to upload for flash file manually, not via contentobjects.

2.

Some development will be required. First you need to make content structure in eZ Publish:

<main movie file>
         |
         | - <file chapter 1>
         | - <file chapter 2>
         | - <file chapter 3>

Next you will need to create new module which will look for file on file system (original file name might be a parameter e.g flash/view/chapter1.flv) and return path to that file or content.

In your main movie will need to include files like flash/view/chapter1.flv

Hope it will help you.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Paul Chilton

Tuesday 17 April 2007 2:24:30 pm

One (unclean) way to do it, which worked for us with .flv files being referenced.

We have a content class called 'interactive', which has a flash_movie piece of data. Use a template override when viewing the class, and pass in the filepath to the flash embedded bit.

Create a new interactive, upload the main flash file, publish the object. Afterwards copy the associated files into the storage folder. Worked out to be under '/var/projectname/storage/original/application' folder.

One thing that caught us out is the apache rewrite rule we use for ezPublish - had to add in |flv in the apache configuration otherwise ezPublish tried to do something with the .flv files.

Template snippet follows:

<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="{$node.data_map.flash_movie.content.width}" height="{$node.data_map.flash_movie.content.height}">
<param name="movie" value={$node.data_map.flash_movie.content.filepath|ezurl} />
<param name="quality" value="{$node.data_map.flash_movie.content.quality}" />
<param name="play" value="{section show=$node.data_map.flash_movie.content.is_autoplay}true{/section}" />
<param name="loop" value="{section show=$node.data_map.flash_movie.content.is_loop}true{/section}" />
<embed src={$node.data_map.flash_movie.content.filepath|ezurl}

Geoff Taylor

Thursday 03 May 2007 4:55:21 pm

Hello,

I started this thread, http://ez.no/community/forum/setup_design/need_help_with_camtasia_flash_videos , but thought I would ask a question here. As stated in that thread I'm having trouble getting the video's function bar (play, pause, etc.). What I thought would work would be to upload the html component from the target video file to a node, then find the uploaded html document in storage and add the rest of the video files. The problem is I can't find where the html document got uploaded to on the server. Right now the html document is sitting in a third level node (home ---> Training ----> Videos). I tried using the computers search function to look for my html file but had no luck.

I'm very new to ez with only a month of experience, but I can't help but think I'm making something that should be very basic, very difficult and frustrating.

Piotrek Karaś

Monday 07 May 2007 11:33:13 am

If I understand what Anthony is looking for, I may have some tips:

1) When (multiple) flash files are displayed or server by some more complex flash clips, then we can speak of a flash module/content scenario, in which a complex movie serves as a module (don't mistake it for eZ module) and then the rest of flash-digestible files (*.swf, *.flv or non-progressive *.jpg) make up the content.

2) A flash module serves multiple purposes so it might be a good idea to make it part of our template, which also means we will have to embed it for good in our design and upload the file manually (a more flexible managed solution would be possible, but it would be more difficult and complex, too).

3) Whenever we store files, images or media as content, eZ publish provides us with a way to learn the path to the file, no matter how deep it is stored. That means it would be possible to pass information to flash module regarding the exact location of all resources wanted (either with JavaScript, XML interface file, URL-like variable notation or whatever else). So I guess it's enough to teach our flash module template to pass the right parameters (based on -say- child flash-readable content objects) to the flash module and then implement desired logic within the flash module.

4) Remember, that both flash module and content should use consistent addressing method for the clips to be able to see each other. Usually 'path/to/flash_file.swf'|ezurl() does the trick for me.

That way the flash content served by flash module is fully managed via eZ publish interface with no further file/template work :) Hope this helps.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu