Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Flash with XML data file View modes: 
User avatar
Member
Member
les@s7mediadesign.com - 8/28/2010 9:59:46 PM
   
Flash with XML data file
Hello,
I am working in version 5.5 and I have a flash movie I want to place in the page. It gets a lot of its parameters from an XML file. The way I used this before in other aspx pages was to databind the XML file to the fjash file.
I cannot seem to get this to work with the Flash web part. The movie loads, the preloader starts, but then it seems it cannot find the rest of the data.

In setting up the webpart I put this in Flash URL:

/Sandbox3/SMF/media/Flash/banner.swf

And this in Additional Parameters:

name="menu" value="false"
name="dataPath" value="/SMF/media/Flash/banner_asset/data.xml"

I get the behavior I described above.

If I were to use this file in a straight HTML file with swfobject.js the code would look like this:

<script type="text/javascript">
var so = new SWFObject("banner.swf", "mymovie", "460", "140", "9");
so.addParam("menu", "false");
so.addVariable("dataPath", "banner_asset/data.xml");
so.write("flashcontent");
</script>


What I seem to be missing is the ability to pass the variable to the movie properly.

Below is the code from the source of the rendered page

<div class="topbanner"><div class="VideoLikeContent" id="FlashPlaceholder_plc_lt_zoneTopBanner_FlashBanner_ltlScript" ></div>
<script src="/Sandbox3/CMSWebParts/Media/Flash_files/flash.js" type="text/javascript"></script><script type="text/javascript">
//<![CDATA[
LoadFlash('FlashPlaceholder_plc_lt_zoneTopBanner_FlashBanner_ltlScript', '/Sandbox3/SMF/media/Flash/banner.swf', 480, 140, 'best', 'default', true, true, 'You have an old version of Adobe\'s Flash Player. \<a href=\"http://www.macromedia.com/go/getflashplayer/\" target=\"_blank\"\>Get the latest Flash player\</a\>.', name="menu" value="false"
name="dataPath" value="/SMF/media/Flash/banner_asset/data.xml"
);
//]]>
</script></div>

Any ideas how to get this to work? I don't use Flash a lot, but when I do use it I tend to use these XML types because they are lighter.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/20/2010 7:56:15 AM
   
RE:Flash with XML data file
Hello,

I would suggets you to try to paste the script mentioned in the first box directly into the page, so you can check, if it works correctly. If yes, then you can create a simple webpart, which would generate this script. The properties generated, would be the properties of the webpart.

Best regards,
Boris Pocatko

User avatar
Member
Member
michael-thefamousgroup.com - 9/23/2010 1:30:13 AM
   
RE:Flash with XML data file
Hi

We came across this problem too and did not find a solution (through support). We ended up having to hack our flash files and embed the XML into them as the CMS was stripping the XML tags from the files.

If you find a solution, please let me know!

Thanks
Michael

User avatar
Member
Member
les@s7mediadesign.com - 9/23/2010 8:35:15 PM
   
RE:Flash with XML data file
I did find a solution to this. it involved the use of an inline control. I wrote out most of the details in my blog - http://s7mediadesign.com/S7-Blog.aspx . Let me know if that is of any use to you. Thanks.

User avatar
Member
Member
les@s7mediadesign.com - 9/23/2010 8:39:54 PM
   
RE:Flash with XML data file
I ended up creating an inline control that woriked. I had tried pasting the code into an HTML web part, but that did not seem to work very well. I was working in the Portal Engine by the way.
I had this same sort of problem with a regular aspx site I had worked on before, so I just adapted the control I used there to an inline control for use in Kentico. I use the Media library to create a directory structure similar to what would be used for an HTML page. That makes updates easy.
Thanks.