The following example shows how you can specify a background image for a Flex VideoDisplay control by setting the backgroundImage style.
Full code after the jump.
Continue reading ‘Setting a background image on a VideoDisplay control in Flex’
The following example shows how you can specify a background image for a Flex VideoDisplay control by setting the backgroundImage style.
Full code after the jump.
Continue reading ‘Setting a background image on a VideoDisplay control in Flex’
The following example shows how you can control the volume on a Flex VideoDisplay control by setting the volume property.
Full code after the jump.
Continue reading ‘Setting the volume on a VideoDisplay control in Flex’
The following example shows how you can use the PopUpManager class to display a VideoDisplay control in a TitleWindow container in Flex.
Full code after the jump.
Continue reading ‘Displaying a video in a pop up window in Flex’
In a previous example, “Setting the background color on a VideoDisplay control in Flex”, we saw how you could modify the background color of a VideoDisplay control in Flex by setting the backgroundColor style.
The following example shows how you can set the background alpha on a Flex VideoDisplay control by setting the backgroundAlpha style.
Full code after the jump.
Continue reading ‘Setting the background alpha on a VideoDisplay control in Flex’
The following example shows how you can modify the background color of a Flex VideoDisplay control by setting the backgroundColor style.
Full code after the jump.
Continue reading ‘Setting the background color on a VideoDisplay control in Flex’
In a previous example, “Displaying a webcam’s video in a Flex VideoDisplay control”, we saw how to connect to a user’s webcam, if they have one installed.
In the following example we see how to listen for the Camera object’s activity event and status event, using some good ol’ ActionScript.
Full code after the jump.
The following example shows you how you can display a user’s webcam feed in a VideoDisplay control using the static Camera.getCamera() method and VideoDisplay class’s attachCamera() method.
Full code after the jump.
Continue reading ‘Displaying a webcam’s video in a Flex VideoDisplay control’
I posted this in response to a forum question the other day and thought I’d share the code here.
The following example shows you how you can clear a VideoDisplay control’s content using the videoPlayer property in the mx_internal namespace.
Full code after the jump.
Continue reading ‘Clearing the video on a Flex VideoDisplay control’
The following example shows how you can listen for stateChange events on a Flex VideoDisplay control to display the video’s current state in a ProgressBar control, List control, or just perform specific actions if a certain state is entered. It also shows how you can use a ProgressBar control to display the amount of video that has already been played, and how much is still remaining by listening for the playheadUpdate event and passing the VideoEvent class’s playheadTime property, and VideoDisplay class’s totalTime property to the ProgressBar class’s setProgress() method.
Full code after the jump.
The following example shows how you can use the new metadataReceived event in Flex 3 to easily grab the metadata from an FLV file.
Full code after the jump.
Continue reading ‘Viewing an FLV video’s metadata using a Flex VideoDisplay control’
In a previous post, “Dynamically creating ActionScript cue points from FlashVars received from the HTML container”, we looked at how to create ActionScript cue points based on variables passed in to our Flex application from the HTML template’s “FlashVars” parameter. In this post we look at a similar approach, although using the <mx:HTTPService /> tag to load cue points from an external file of name/value pairs. This example could easily be extended further to pass a variable to a server-side script which would grab cue point information from a database and pass it back into Flex either as a string of name/value pairs, or as an XML document.
Full code after the jump.
In a previous post, “Creating ActionScript cue points with the VideoDisplay controlEdit”, reader Florian asks how you can set cue points dynamically from FlashVars.
Well, here’s one method of passing a single name/value pair from the HTML template into our Flex application and having Flex parse the string and dynamically add the ActionScript cue points to the VideoDisplay control.
Hope that helps.
Full code after the jump.
This is semi-related to the previous post, but this is something I’ve wanted to do for a while now. In fact, I first started thinking about it when I did the Image color picker sample. Basically, how can you take a bitmap image of something on the Stage and then create an item renderer out of it. The answer turned out to be fairly easy (much to my surprise).
In this mini-application we look at how to take a snapshot of the video at each cue point. We then take that bitmap, and bind it to a TileList control’s data provider so our TileList shows handy video cue points, along with an HTML-formatted label of the cue point name/time/type.
Full code after the jump.
Continue reading ‘Creating FLV cuepoint thumbnails using the Bitmap and BitmapData classes’