Is it possible to pass eZ content to Flash file..?

Author Message

Satheesh R

Friday 14 March 2008 3:34:03 am

Hi all,

Is it possible to pass eZ contents (like Article attributes say Title, Summary, Body, ..etc) to Flash file..? if so how, kindly guide me

Thanks and Regards
R Satheesh

Patrick Kaiser

Friday 14 March 2008 4:13:48 am

hi,

you could simply add flashVars to your embed tag or to the javascript (e.g. swfobject) used to embed the swf. Another possibility is to generate xml (via a custom layout or a xml view) and pass that xml to the swf.

best regards,

patrick


Best regards,

Patrick

Satheesh R

Friday 14 March 2008 4:44:12 am

Hi Patrik,

Thanks for the reply, if you don't mind kindly explain it with an example.

Thanks and Regards
R Satheesh

Andreas Kaiser

Friday 14 March 2008 10:08:37 am

We have done it using flash files that read xml files (for example flash files from flashden.net)

If you want to know how to create flash files that read xml (I can't help you, I'm not a good flash programmer) but you can google for tutorials:

some I've found:

http://www.kirupa.com/web/xml/index.htm
http://www.flash-creations.com/notes/dynamic_xml.php

In ezp to generate xml files (that can be read by flash) you need to create specific templates that follow the xml structure the flash file needs.

If I remember right it's important to configure a xml layout in siteaccess:

http://ez.no/developer/forum/developer/how_to_get_xml_output_for_all_the_contents/re_how_to_get_xml_output_for_all_the_contents
http://ez.no/developer/forum/general/xml_header_xml_version_1_0/re_xml_header_xml_version_1_0_qu

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

Piotrek Karaś

Friday 14 March 2008 10:39:01 am

Isn't flash capable of consuming web services? That would be another exchange method, I believe.

--
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

Patrick Kaiser

Saturday 15 March 2008 2:19:59 am

here is a step by step guide to embed a swf file using the swfobject javascript library:

<script type="text/javascript" src="path/to//swfobject.js"></script>
<div id="flashcontent">
	<div id="noFlashContent">
	This Text is only seen if javascript is disabled or the required plugin version is not available
	</div>
</div>

<script type="text/javascript">
	
	var so = new SWFObject( "path/to/swf.swf", "movie", "100%", "100%", "9", "#000000" );
	
	/* configure swfObject, all params are optional */
	so.addParam("scale", "noScale");
	so.addParam("wmode", "transparent");
	so.addParam("align", "TL");
	so.addParam("allowScriptAccess", "always");
	so.useExpressInstall('path/to/expressinstall.swf');
	
	/* Pass your own Variables here */
	so.addVariable( "XMLpath", "/layout/set/flashxmlhome/content/view/full/1018" );
	so.addVariable( "Title", "{$node.data_map.title.content|wash( 'xhtml' )}" );
	so.addVariable( "Body", "{$node.data_map.body.content.output.output_text|wash( 'xhtml' )}" );
	
	/* 
	   finally tell swfobject to insert the swf in the object with css-id 'flashcontent' 
	   All content that was in 'flashcontent' before will be replaced by the swf
	 */
	so.write( "flashcontent" );
	
</script>

Hope this helps a bit..


Best regards,

Patrick

Björn [email protected]

Saturday 15 March 2008 3:54:26 am

In addition to Patrick's example.

Please do not use /layout/set ....

layout set has a quite high processing time due internal redirecting

I recommend creating a new module for this specific need.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Satheesh R

Sunday 16 March 2008 10:03:29 pm

Dear all,

Thanks for the replies, sorry for the delayed response. I'll try to get the solutions using the above replies.

Hi Patrik and all,
My requirement is, for example i have a folder called <b> Articles </b> which contains <i> Article1, Article2, Article3, Article4 and Article5 </i> [Article class consists of Title, Body and Image]. Now i have to Display all the Articles in the user side one by one, lets say Article1 as page 1 and Article2 as page 2... and so on.. using flash.

Just guide me how to show these articles in user side using flash and also suggest me which one is better in the following.

<b>Option 1: </b> From the normal user page, user has to click on some text called <b> Article </b> then i'll open a flash page(with Next & Prev button) to show the Article1.....5.
<b>Option 2: </b> Directly show the flash with the exciting User page

Thanks and Regards
R Satheesh

Heath

Monday 17 March 2008 6:38:33 am

Another set of alternatives available depending on your preference or needs is to consider more advanced methods using flash remoting or json

http://projects.ez.no/remoting

http://projects.ez.no/json

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Satheesh R

Monday 17 March 2008 9:19:29 pm

Hi Health,

No projects are found in the following :(

http://projects.ez.no/remoting
http://projects.ez.no/json

Thanks and Regards
R Satheesh

Bruce Morrison

Monday 17 March 2008 11:23:53 pm

@Björn

Please do not use /layout/set ....

layout set has a quite high processing time due internal redirecting

I recommend creating a new module for this specific need.

My recollection of how set/layout works is that some internal variables are set that tell the system what pagelayout.ini to use then processing is passed off (internally) to content/view.

I've always assumed that the content caching from content/view is in place and any access after the initial (cache building) one is as quick as for a "normal' access.

Are you saying that the passing off to content/view has the high processing? What kind of improvements to you see with custom modules?

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

Heath

Tuesday 18 March 2008 12:08:14 am

<i>@Satheesh</i>

You are clearly confused. There most clearly are projects json and remoting on projects.ez.no ...

These supporting urls show the source code for these projects currently available via <b>subversion</b> through projects.ez.no

<i>
http://projects.ez.no/remoting/subversion
http://svn.projects.ez.no/remoting/trunk/extension/remoting
http://websvn.projects.ez.no/wsvn/remoting

http://projects.ez.no/json/subversion
http://svn.projects.ez.no/json
http://websvn.projects.ez.no/wsvn/json</i>

What may not be available is a packaged download. More often expert eZ Publish developers do not use Official packaged releases as much Subversion branches.

Cheers,
Heath

<b>Use Subversion!</b>

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Satheesh R

Tuesday 18 March 2008 9:22:13 pm

Hi Heath,

Thanks a lot, for the links
Using subversion i downloaded everything and i followed the steps to use the extensions, but i got an error.I'm unable to establish the connection for Gateway.

Thanks and Regards
R Satheesh

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.