<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

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

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

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

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

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

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.

Syntax

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

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