Forums / Developer / how to get path for specific flash file

how to get path for specific flash file

Author Message

John Mina

Monday 30 July 2007 3:25:05 pm

Hello
I have a banner that i will be showing in the top of the website.
I uploaded the flash file in the media section as a a flash file

I used the following code to show the file

{def $n=fetch(content,node,hash(node_id,181))}
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="730" height="168">
						<param name="movie" value={$n.data_map.file.content.filepath|ezroot}>
						<param name="quality" value="High">
						<embed src={$n.data_map.file.content.filepath|ezroot} pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="730" height="168"></object>


	{/def}

NOTE THE PART : {$n.data_map.file.content.filepath|ezroot}

This returns the path to the file that is stored in the var folder. but the file is still not shown

how would i help it ?

NOTE: i am trying to build using version 3.9.2

Thanks
john

Bruce Morrison

Monday 30 July 2007 4:42:35 pm

Hi John

Try

...
{def $n=fetch(content,node,hash(node_id,181))}
{def $attribute=$n.object.data_map.file}
...
<param name="movie" value={concat("content/download/",$attribute.contentobject_id,"/",$attribute.content.contentobject_attribute_id,"/",$attribute.content.original_filename)|ezurl} />
...

If you still have trouble can you post the resulting HTML so we can see if there are any clues there.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

John Mina

Tuesday 31 July 2007 12:10:46 am

hello Bruce,
this Code is smart thanks :)
I used it in the embed and the < param movie part

and tit works now perfect as it should be
Thanks again ,
all the best

If you have any further tips on how do some one can think of making that code to construct and use it in future, let me know plz
thanks
John