Search Here

apex: flash Component in Visualforce Page

 The <apex: flash> component is another useful component in the VF page that acts as a Flash movie, rendered with the HTML object and embed tags.


The <apex: flash> component has the following attributes:


1. flashvars


The flashvars attribute is a string-type attribute used to import the root level variables to the movie created before the first frame of the SWF is played. The value should consist of a list of ampersand-separated name-value pairs.


Syntax


<apex: flash flashVars="varName"></apex: flash>  

2. height


The height attribute is a string-type attribute used to specify the height at which this movie is displayed. We specify its value as a relative percentage of the total available vertical space or as a number of pixels.


Syntax


<apex: flash height="50%"></apex: flash>  

3. id


The id attribute is a string-type attribute, i.e., a unique identifier that allows this component to be referenced by other components on the page.


Syntax


<apex: flash id="flashId"></apex: flash>  

4. loop


The loop attribute is a Boolean-type attribute that specifies whether the flash movie plays repeatedly or just once. Boolean-value false is set as the default value for this attribute.


Syntax


<apex: flash loop="true"></apex: flash>  

5. play


The play attribute is a Boolean-type attribute that specifies whether the flash movie automatically begins playing when displayed. Boolean-value false is set as the default value for this attribute.


Syntax

AD


<apex: flash play="true"></apex: flash>  

6. rendered


The rendered attribute is a Boolean-type attribute used to specify whether this component is rendered on the page or not. Boolean-value true is set as the default value for this attribute.


Syntax


<apex: flash rendered="false"></apex: flash>  

7. src


The src attribute is a string-type attribute used to specify the path to the movie displayed. The value for this attribute is expressed as a URL. We can store the flash movie in a static resource in Salesforce.

AD


Syntax


<apex: flash src="URL of flash movie"></apex: flash>  

8. width


The width attribute is a string-type attribute used to specify the width at which this movie is displayed. We specify its value as a relative percentage of the total available horizontal space or as a number of pixels.


Syntax


<apex: flash width="50%"></apex: flash>  

Let's take an example to understand how we can use the <apex: flash> component on the VF page:


Note: Salesforce retired the <apex: flash> component with the Winter '21(October 2020) release'. So, we cannot use this component on the Visualforce page as Salesforce depreciated it.

ApexFlashExample.vfp


<apex: page sidebar="false" showheader="false">  

    <apex: flash src="http://www.adobe.com/devnet/flash/samples/drawing_1/1_coordinates.swf" height="300" width="100%" />  

</apex: page>  

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.