on 11-16-2008 10:39 PM
I understand how to create and pass XML data to my dashboard. Is it possible to pass the XML path so that I can control which XML data set is read?
For example, I could have an individual edit an existing dashboard with local XML test data (file:
C:/temp/test.xml)
which I can provide. When finished, they could load the dashboard to the web where a different XML path (pointing to production data) is used.
Can this be done?
Many thanks,
Jim
Hi James,
Yes, it can. In the XML Data connection there is a binding button at the far right of the "XML Data URL:" field. You can bind this to a cell and dynamically enter the .xml file path at SWF runtime.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
How would I pass it as a varable at runtime? I saw an example online but have been unable to implement this properly. I think it is a sytax error on my part. My xml file is c:\Xcelsius\example.xml and looks like this:
<data>
<variable name="ExampleRange">
<row>
<column> 29 </column>
<column> 22 </column>
<column> 18 </column>
<column> 59 </column>
</row>
</variable>
<variable name="ExampleRange2">
<row>
<column> 39 </column>
<column> 29 </column>
<column> 38 </column>
<column> 53 </column>
</row>
</variable>
</data>
I believe it correct syntax. When I hardcode the path and name into my data connection, the data is displayed in the dashboard and I can edit the xml and see real time changes.
When I create the .swf and the .html code, it looks like this:
<HTML>
<HEAD>
<TITLE>test3.swf</TITLE>
</HEAD>
<BODY>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
WIDTH="607" HEIGHT="418" id="myMovieName">
<PARAM NAME=FlashVars VALUE="_xmlUrl=%3Cdata%3E%3Crow%3E%3Ccolumn%3E%3C%2Fcolumn%3E%3C%2Frow%3E%3C%2Fdata%3E">
<PARAM NAME="movie" VALUE="test3.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<PARAM NAME="play" VALUE="true">
<PARAM NAME="loop" VALUE="true">
<PARAM NAME=bgcolor VALUE="#FFFFFF">
<EMBED src="test3.swf" quality=high bgcolor=#FFFFFF WIDTH="607" HEIGHT="418"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
play="true" loop="true"
FlashVars="_xmlUrl=%3Cdata%3E%3Crow%3E%3Ccolumn%3E%3C%2Fcolumn%3E%3C%2Frow%3E%3C%2Fdata%3E"
PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</BODY>
</HTML>
I changed the value of _xmlUrl to:
<HTML>
<HEAD>
<TITLE>test3.swf</TITLE>
</HEAD>
<BODY>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
WIDTH="607" HEIGHT="418" id="myMovieName">
<PARAM NAME=FlashVars VALUE="_xmlUrl=file://C:\Xcelsius\example.xml">
<PARAM NAME="movie" VALUE="test3.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<PARAM NAME="play" VALUE="true">
<PARAM NAME="loop" VALUE="true">
<PARAM NAME=bgcolor VALUE="#FFFFFF">
<EMBED src="test3.swf" quality=high bgcolor=#FFFFFF WIDTH="607" HEIGHT="418"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
play="true" loop="true"
FlashVars="_xmlUrl=file://C:\Xcelsius\example.xml"
PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</BODY>
</HTML>
When viewing in IE, I receive a error #2148
Can you tell where I have gone wrong?
Many Thanks,
Jim
Try changing your Flash Security Settings:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
In Global Security Settings, give Flash access to the folder where the XML files are located.
I changed the value of _xmlUrl to:
Ah, and maybe try changing the url with a binding, as described in post #2.
It seems you're currently using Flash Vars:
<PARAM NAME=FlashVars VALUE="_xmlUrl=%3Cdata%3E%3Crow%3E%3Ccolumn%3E%3C%2Fcolumn%3E%3C%2Frow%3E%3C%2Fdata%3E">
This string describes the cell structure of the Flash Vars binding. When you completely replace it, that may cause the error. Instead, if you're wanting to somehow use Flash Vars to pass the XML string, you'll need to insert the path into the structure somewhere (between the two column tags, if I'm not mistaken).
Edited by: Javier Jimenez on Nov 17, 2008 7:32 PM
and yes, I was able to bind in the data connection.
Thanks again...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent! It was the Flash security settings that needed to be changed.
The final version of the .html is :
<HTML>
<HEAD>
<TITLE>test3.swf</TITLE>
</HEAD>
<BODY>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
WIDTH="607" HEIGHT="418" id="myMovieName">
<PARAM NAME=FlashVars VALUE="_xmlUrl=file://C:\Xcelsius\example.xml">
<PARAM NAME="movie" VALUE="test3.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<PARAM NAME="play" VALUE="true">
<PARAM NAME="loop" VALUE="true">
<PARAM NAME=bgcolor VALUE="#FFFFFF">
<EMBED src="test3.swf" quality=high bgcolor=#FFFFFF WIDTH="607" HEIGHT="418"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
play="true" loop="true"
FlashVars="_xmlUrl=file://C:\Xcelsius\example.xml"
PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</BODY>
</HTML>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.