Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ahmad Rose
Embed flash at portal_normal.vm
November 24, 2011 12:04 AM
Answer

Ahmad Rose

Rank: New Member

Posts: 3

Join Date: November 23, 2011

Recent Posts

Hi,

i'm new with liferay 6 emoticon, can anyone tell me how i can embed my flash video .swf into the portal_normal.vm

Thanks
Adolfo Benedetti
RE: Embed flash at portal_normal.vm
November 24, 2011 1:05 AM
Answer

Adolfo Benedetti

Rank: Junior Member

Posts: 45

Join Date: June 3, 2009

Recent Posts

Hi Ahmad,

You can do something like this:
 1     ....... </header>
 2      <div id="banner">
 3        <div id="flashcontent">
 4        #set ($user_movie = "/documents/10154/0ceef80d-1b93-4d9f-9957-b7824511044b") ##DLFlashUUID
 5        #set ($flashvars = "empty")
 6          <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="990" height="192" id="02.resources" align="middle">
 7            <param name="movie" value="$user_movie" />
 8            <param name="quality" value="high" />
 9            <param name="bgcolor" value="#fa9739" />
10            <param name="play" value="true" />
11            <param name="loop" value="true" />
12            <param name="wmode" value="transparent" />
13            <param name="scale" value="showall" />
14            <param name="menu" value="true" />
15            <param name="devicefont" value="false" />
16            <param name="salign" value="" />
17            <param name="allowScriptAccess" value="sameDomain" />
18            <param name="flashvars" value="$flashvars" />
19            <!--[if !IE]>-->
20            <object type="application/x-shockwave-flash" data="$user_movie" width="990" height="192">
21          <param name="movie" value="$user_movie" />
22          <param name="quality" value="high" />
23          <param name="bgcolor" value="#fa9739" />
24          <param name="play" value="true" />
25          <param name="loop" value="true" />
26          <param name="wmode" value="transparent" />
27          <param name="scale" value="showall" />
28          <param name="menu" value="true" />
29          <param name="devicefont" value="false" />
30          <param name="salign" value="" />
31          <param name="allowScriptAccess" value="sameDomain" />
32              <param name="flashvars" value="$flashvars" />
33          <!--<![endif]-->
34          <a href="http://www.adobe.com/go/getflash">
35            <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" width="990" heigth="192" alt="Get Adobe Flash player" />
36          </a>
37          <!--[if !IE]>-->
38            </object>
39            <!--<![endif]-->
40          </object>
41        </div>
42      </div>
43      <div id="content">....
Ahmad Rose
RE: Embed flash at portal_normal.vm
November 24, 2011 4:34 AM
Answer

Ahmad Rose

Rank: New Member

Posts: 3

Join Date: November 23, 2011

Recent Posts

Hi Adolfo,

Thanks a lot for the code u give me emoticon, that is very helpful for me.
What should i change at the code if i put the .swf file at the specific folder
under the /image folder.
I put the .swf folder under the folder named template.

Thanks
Raja Nagendra Kumar
RE: Embed flash at portal_normal.vm
November 24, 2011 4:54 AM
Answer

Raja Nagendra Kumar

Rank: Expert

Posts: 484

Join Date: March 1, 2006

Recent Posts

You need make sure velocity template variable user_movie is set as in line

#set ($user_movie = "/documents/10154/0ceef80d-1b93-4d9f-9957-b7824511044b")

replace the $user_movie with URL of swf.. such should be available to public with normal http request.

<param name="movie" value="$user_movie" />


You can more info on velocity variables at
http://www.liferay.com/community/wiki/-/wiki/Main/Custom+Velocity+Variables#section-Custom+Velocity+Variables-Custom+Velocity+Variables

Regards,
Nagendra
Ahmad Rose
RE: Embed flash at portal_normal.vm
November 24, 2011 7:07 PM
Answer

Ahmad Rose

Rank: New Member

Posts: 3

Join Date: November 23, 2011

Recent Posts

Hi Adolfo, Raja

Thanks so much, i've try the code you all give to me. And i get what i want to look at my dev site.
My flash video run successfully!emoticon

Thanks again!!