Forums / Setup & design / Flash + eZ can use the same data

Flash + eZ can use the same data

Author Message

laurent le cadet

Wednesday 16 November 2005 6:40:48 am

Hi,

We can easilly use attribute of an object in a flash file.
the code below can be used in a e.g full article.tpl :

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/...sh/swflash.cab#version=6,0,0,0" width="300" height="400" id="PlanPenfeld" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="/fr/content/download/111/460/plan_penfeld.swf" />
<param name="FlashVars" value="localisation={$node.object.data_map.plan.content}&nom={$node.object.data_map.nom.content}">
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="/fr/content/download/111/460/plan_penfeld.swf" FlashVars="localisation={$node.object.data_map.plan.content}&nom={$node.object.data_map.nom.content}" quality="high" bgcolor="#ffffff" width="300" height="400" name="PlanPenfeld" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

Laurent

Łukasz Serwatka

Wednesday 16 November 2005 6:45:53 am

Hi Laurent,

That is interesting, could you show AS code (a part of it, which reads data)?

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

laurent le cadet

Wednesday 16 November 2005 7:06:33 am

Hi Lukasz,

See the code below :

this.createTextField("plan", 10, 100, 10, 100, 20);
if (_level0.localisation == undefined) {
 plan.text = "";
} else {
 plan.text = _level0.localisation;
 liste = _level0.localisation.split("/");
 nombre = liste.length;
 for (i=0; i<nombre; i++) {
  clip = liste[i];
  eval(clip).nextFrame();
 }
}
this.createTextField("etablissement", 20, 100, 30, 100, 20);
if (_level0.nom == undefined) {
 etablissement.text = "";
} else {
 etablissement.text = _level0.nom;
}
textFormat = new TextFormat();
textFormat.font = "Arial";
textFormat.size = 12;
textFormat.color = 0x000000;
plan.setTextFormat(textFormat);
etablissement.setTextFormat(textFormat);

We did it, not to render xml content (eZ already do it) but to add a flash map in article.tpl
We customized the classic article class by adding a textline where you can write the geolocalisation of the content.

Tha site is actually under construction but you can have a quick look here :
http://salon-azimut.safetyhost.net/fr/exposants/services_aux_etudiants/lycee_xxx

It's much better than a long explanation.

Actualy we are working to extend the process in the other way :

- fetch children attributes of a folder
- render them on a map (icon, additional text, ...)
- link to the whole content (back to eZ classic render)

I hope this can open a new long thread full of ideas...and solutions ;)

Laurent

Siniša Šehović

Wednesday 16 November 2005 9:45:16 am

Hi Laurent,

this is realy great.

I did some flash menu with LoadVars from eZP.
Managed to stop flash menu on specific keyframe after refresh, based on sessionID and userID.

Take a look at this link.
http://weblogs.macromedia.com/mxna/reports/mostProlificFeeds/index.cfm?numberOfDays=1

Great interface.

S.

---
If at first you don't succeed, look in the trash for the instructions.

laurent le cadet

Wednesday 16 November 2005 9:58:15 am

Hi Sinisa,

Yes, as the flash component are based on xml (with xml connector) we can do something that way.
But I think it's another story than the simple FlashVars...

Laurent

Nice hat !

eZ debug

Timing: Jan 21 2025 21:06:58
Script start
Timing: Jan 21 2025 21:06:58
Module start 'content'
Timing: Jan 21 2025 21:06:58
Module end 'content'
Timing: Jan 21 2025 21:06:58
Script end

Main resources:

Total runtime0.2058 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 590.9375180.8359
Module start 'content' 0.00870.0116 771.7734102.0078
Module end 'content' 0.02040.1853 873.7813531.3281
Script end 0.2057  1,405.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00371.7793200.0002
Check MTime0.00140.6799200.0001
Mysql Total
Database connection0.00150.742110.0015
Mysqli_queries0.139267.65951410.0010
Looping result0.00160.79371390.0000
Template Total0.184789.710.1847
Template load0.00090.454010.0009
Template processing0.183789.286610.1837
Override
Cache load0.00060.297410.0006
Sytem overhead
Fetch class attribute can translate value0.00090.436510.0009
XML
Image XML parsing0.00030.129210.0003
General
dbfile0.00703.4081200.0004
String conversion0.00000.003830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs