Forums / Setup & design / Flash and xml problem

Flash and xml problem

Author Message

Christophe DEMOIRE

Thursday 10 August 2006 3:40:05 am

Hello,

I have a flash file based on a xml file (Menu.xml) which creates a menu. Without ezpublish that works very well.
In the .tpl I put:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="830" height="40" id="Menu" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value={"images/menu.swf"|ezdesign} />
<param name="quality" value="high" /><param name="wmode" value="transparent" />
<param name="bgcolor" value="#ffffff" />
<embed src={"images/menu.swf"|ezdesign} quality="high" wmode="transparent" bgcolor="#ffffff" width="830" height="40" name="Menu" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

But nothing made there, it wants to take into account the xml...
I have already put the xml file in different place:
- the ezpublish root directory
- the images directory
- the design directory
- etc...

A desperate man.

I already cleared the cache!

Patrick Kaiser

Thursday 10 August 2006 5:15:13 am

you most probably have to alter your apache rewrite rule in order to allow access to .xml documents. to do so add a line like this in your vhost configuration:

RewriteEngine On
RewriteRule ^/(.*)(\.)xml - [L]
.. further rules here ..

In case you want to use information that is available within ez publish (e.g. node-names, text, images) in flash the better solution would be if you create a flash specific template, that fetches the relevant content and than outputs the plain xml. you could also define a new xml layout template in layout.ini.append.php und call it via http://[yourhost]/layout/set/[yourxmllayout]/content/view/full/[node_id].

regards, patrick


Best regards,

Patrick

Christophe DEMOIRE

Thursday 10 August 2006 5:58:55 am

Hi Patrick,

I dont't understand why use rewrite rules. The flash menu works in a html file. But, when I put it in my eZ templates, it doesn't work anyway.
The flash file require a xml file called "Menu.xml" wich is in the same directory. I cannot specify the path to the Menu.xml.

I think eZ publish don't load the xml file, or in a inccorect place.

I already cleared the cache!

Patrick Kaiser

Thursday 10 August 2006 9:57:28 am

If you installed ez publish according to the manual you have either created a dedicated virtual host for your ez publish site that contains some rewrite rules or you use an .htaccess file that contains theese rewrite rules. the standard rules prevent apache to deliver certain types of documents as for example .xml-files. if you request for example http://yoursite/menu.xml the rewrite rule prevent apache from delivering it, instead the request /menu.xml will be rewritten to the index.php which will cause ez publish to lookup menu.xml what will result in a 'module not found' error.

You see, the reason why flash cant use your xml-file is a rewrite rule.

if you use the standard .htaccess file you have to add 'xml' somewhere between the first '()'-group:

RewriteEngine On
RewriteRule !\.(gif|jpe?g|png|css|js|html|xml)|var(.+)storage.pdf(.+)\.pdf$ index.php

if you have a virtual host based setup you can add the rewrite rule from my previous post..

best regards, patrick


Best regards,

Patrick

Brian Gambill

Thursday 10 August 2006 5:29:58 pm

I had a similar problem trying to pull in external swf files. I was able to solve it using the "base" parameter.

See http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_04157.

<PARAM NAME="BASE" VALUE="http://www.domainname.com/software">

eZ debug

Timing: Jan 30 2025 21:36:16
Script start
Timing: Jan 30 2025 21:36:16
Module start 'content'
Timing: Jan 30 2025 21:36:16
Module end 'content'
Timing: Jan 30 2025 21:36:16
Script end

Main resources:

Total runtime0.3569 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 587.9219370.3047
Module start 'content' 0.00900.0133 958.22661,009.6250
Module end 'content' 0.02230.3345 1,967.85163,895.4141
Script end 0.3568  5,863.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00441.2395200.0002
Check MTime0.00130.3631200.0001
Mysql Total
Database connection0.00080.233910.0008
Mysqli_queries0.253971.14741410.0018
Looping result0.00160.45251390.0000
Template Total0.334293.610.3342
Template load0.00070.194110.0007
Template processing0.333593.434010.3335
Override
Cache load0.00050.128110.0005
Sytem overhead
Fetch class attribute can translate value0.00200.547810.0020
XML
Image XML parsing0.00020.064710.0002
General
dbfile0.00872.4302200.0004
String conversion0.00000.002030.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.0001 secs