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 Dieding@xrow.de

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.

eZ debug

Timing: Jan 18 2025 21:06:22
Script start
Timing: Jan 18 2025 21:06:22
Module start 'layout'
Timing: Jan 18 2025 21:06:22
Module start 'content'
Timing: Jan 18 2025 21:06:22
Module end 'content'
Timing: Jan 18 2025 21:06:22
Script end

Main resources:

Total runtime0.8741 sec
Peak memory usage4,096.0000 KB
Database Queries97

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.0469152.6406
Module start 'layout' 0.00590.0027 740.687539.4766
Module start 'content' 0.00860.8639 780.1641880.6563
Module end 'content' 0.87260.0015 1,660.820332.1250
Script end 0.8740  1,692.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4366160.0002
Check MTime0.00170.1914160.0001
Mysql Total
Database connection0.00110.121610.0011
Mysqli_queries0.767787.8285970.0079
Looping result0.00120.1372950.0000
Template Total0.839796.120.4199
Template load0.00220.251320.0011
Template processing0.837595.817320.4187
Template load and register function0.00010.017210.0001
states
state_id_array0.00110.121410.0011
state_identifier_array0.00110.128520.0006
Override
Cache load0.00210.2360880.0000
Sytem overhead
Fetch class attribute can translate value0.00100.116670.0001
Fetch class attribute name0.00280.3221190.0001
XML
Image XML parsing0.00450.519470.0006
class_abstraction
Instantiating content class attribute0.00020.0212210.0000
General
dbfile0.00270.3071480.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
13content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
26content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
11content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 62
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs