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.