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 !

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 31 2025 07:23:03
Script start
Timing: Jan 31 2025 07:23:03
Module start 'layout'
Timing: Jan 31 2025 07:23:03
Module start 'content'
Timing: Jan 31 2025 07:23:04
Module end 'content'
Timing: Jan 31 2025 07:23:04
Script end

Main resources:

Total runtime1.1455 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 588.1328151.2109
Module start 'layout' 0.00440.0038 739.343836.6641
Module start 'content' 0.00821.1365 776.00781,019.8203
Module end 'content' 1.14470.0008 1,795.828115.8438
Script end 1.1454  1,811.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2692160.0002
Check MTime0.00130.1115160.0001
Mysql Total
Database connection0.00070.057710.0007
Mysqli_queries1.066093.0611650.0164
Looping result0.00080.0667630.0000
Template Total1.109996.920.5550
Template load0.00220.194320.0011
Template processing1.107796.700920.5538
Template load and register function0.00150.129710.0015
states
state_id_array0.00190.161710.0019
state_identifier_array0.00100.091720.0005
Override
Cache load0.00200.1713460.0000
Sytem overhead
Fetch class attribute can translate value0.00090.078730.0003
Fetch class attribute name0.00260.229080.0003
XML
Image XML parsing0.00720.627230.0024
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00820.7184290.0003
String conversion0.00000.000540.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/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: 34
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs