Setting the video alpha on a Spark VideoPlayer control in Flex 4

The following example shows how you can set the video alpha on a Spark VideoPlayer control in Flex 4 by setting the alpha property on the VideoPlayer instance’s videoDisplay property.

The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see To download the latest nightly build of the Flex 4 SDK, see

For more information on getting started with Flex 4 and Flash Builder 4, see the official Adobe Flex Team blog.

<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<s:Application name="Spark_VideoPlayer_videoElement_alpha_test"
        <mx:Form paddingTop="0" paddingBottom="0">
            <mx:FormItem label="alpha:">
                <s:HSlider id="sldr"
                        change="vdPlyr.videoDisplay.alpha = sldr.value;" />
    <s:VideoPlayer id="vdPlyr"
            horizontalCenter="0" verticalCenter="0" />


View source is enabled in the following example.

This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.

6 thoughts on “Setting the video alpha on a Spark VideoPlayer control in Flex 4

  1. Hello Peter,

    Could you clarify for me one question?
    The ‘outgoing’ VideoDisplay’ component supports AS cue points. This feature seems to be completely dropped from the VideoPlayer and VideoElement.
    Is there a way to add cue points within VideoPlayer/VideoElement, or it’s only possible with VideoDisplay?

    Igor Borodin

  2. @Igor Borodin,

    Currently, I believe it is only possible with the older VideoDisplay control. As far as I understand, the VideoPlayer/VideoElement controls are being updated to use the Open Source Media Framework (OSMF) instead of the FLVPlayback code. So I believe that enhanced cuepoint support will most likely be added in the future, but I don’t have any first hand knowledge of when/if that would actually be happening.

    But please file a bug/enhancement request at and you may get a bit better idea on how soon it may be happening (depending on whether the bug is opened/deferred). Plus, that way you can watch the bug and be notified of new comments and updates.


    1. Hello Peter,

      While working with VideoPlayer today, I’ve noticed that code completion offers me two VideoPlayers, both from the spark.components package: VideoPlayer and VideoPlayer2. And it’s also reflected in the language reference.
      What’s the difference?

      Igor Borodin

  3. Thank you Peter for the clarification.
    Meanwhile, perhaps using the combination of playheadTime and playheadUpdate will suffice.
    Thank you,

Comments are closed.