Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
lucky singh
Embed flash in Web Content Display
October 9, 2012 11:26 PM
Answer

lucky singh

Rank: Junior Member

Posts: 26

Join Date: July 30, 2012

Recent Posts

I have a requirement where in a page is to be duplicated. This page has several image appearing with effects. It has images path stored in xml file & effects in flash files. I am using web content display, when i include just the plain swf files output is blank . I have included other .swf files in flash link they are working fine.But this .swf files need images so its blank. I have tried making a portlet, passing images in array and then giving transitions through javascript but the same effect is not achieved more over when i include portlet in my website my theme & other WCD is disturbed so i have dropped portlet way. But other than this how can the image be passed to WCD on a flash link.Please help as how the image & flash to be embeded in web content display.

My Actual page has xml :
1<?xml version="1.0" encoding="utf-8" ?>
2- <slides>
3  <slide imageUrl="/images/home/A_397x930px.jpg" />
4  <slide imageUrl="/images/home/B_397x930px.jpg" />
5  <slide imageUrl="/images/home/C_397x930px.jpg" />
6  <slide imageUrl="/images/home/D_397x930px.jpg" />
7  </slides>


My flash code :
1<script language="javascript" type="text/javascript">
2var so = new SWFObject("/andiosp-flash.swf", "mymovie", "930", "398", "8", "#ffffff"); so.addParam("quality", "high");so.addParam("wmode", "transparent");so.addParam("allowFullScreen", "true");so.addParam("salign", "t");so.write("flashcontent");</script>


Any help is appreciated
Bart Simpson
RE: Embed flash in Web Content Display
October 9, 2012 11:45 PM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 523

Join Date: August 29, 2011

Recent Posts

Just an idea: -

I would suggest passing the images path like http://helpx.adobe.com/flash/kb/pass-variables-swfs-flashvars.html
You can create a structure of wcd and with attach image option. And when creating the web content apply structure and select images.
Create template and add the code as described in the link from adobe. You can get the image source path directly in template from structure variables, or use saxParserUtil to parse the xml and read path.
lucky singh
RE: Embed flash in Web Content Display
October 10, 2012 12:10 AM
Answer

lucky singh

Rank: Junior Member

Posts: 26

Join Date: July 30, 2012

Recent Posts

I have stored all images in image repository. Now how can flash code access the folder.Please help.
Bart Simpson
RE: Embed flash in Web Content Display
October 10, 2012 12:19 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 523

Join Date: August 29, 2011

Recent Posts

You have placed them in image repository ? Is it not an option to place it into liferay's document library?
Otherwise their links have to be hardcoded in the template.
lucky singh
RE: Embed flash in Web Content Display
October 10, 2012 12:32 AM
Answer

lucky singh

Rank: Junior Member

Posts: 26

Join Date: July 30, 2012

Recent Posts

Yes the same. While creating wcd, image icon has option to upload images and it get store there. You mean the same right.
Bart Simpson
RE: Embed flash in Web Content Display
October 10, 2012 3:04 AM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 523

Join Date: August 29, 2011

Recent Posts

No, I meant the structure fields. You can create a structure ion liferay and add a repetable image button and give it a name. So when creating the web content, you can use upload multiple images, and in the template get the url by somevariablename.getUrl()