Dela via


Insert an audio or video file into the active document

In Microsoft Expression Blend, you can now drag supported audio or video files onto the artboard from outside Expression Blend, and also use the Insert feature of the Projects panel. Audio and video files are added to the artboard wrapped in a MediaElement control, complete with a timeline. To use the Insert feature, the file must be one of the supported types listed in Inserting audio and video.

Note

To work with media files in Expression Blend, you must have Windows Media Player 10 installed on your computer. You can download Windows Media Player 10 from the Windows Media website.

To add an audio or video file to a project

Do one of the following:

  • On the Project menu, click Add Existing Item. Browse to the location of the audio or video file that you want to add to the current project, and then click Open.

  • Drag the file from a folder in Windows Explorer or from your desktop into the Projects panel.

The media file appears in the Projects panel, from which you can insert it into the active element in the open document.

To insert an audio or video file into the active document

  1. Do one of the following:

    • In the Projects panel, double-click an audio or video file, or right-click an audio or video file, and then click Insert. Or, if you want to add the media file as a child element in another element in the document, click that element in the Objects and Timeline panel to make it the active element, and then insert the audio or video file.

    • Drag an audio or video file from the Projects panel onto the artboard.

    • Drag an audio or video file from a folder in Windows Explorer or from your desktop onto the artboard.

    If a timeline is selected before insertion, the media file will be inserted into that timeline, and the media file will be scheduled to start at the current playhead location. For example, if the playhead is at time=5.0s on the OnLoaded tab when the media file is inserted, the media file will not start to play until 5 seconds after the document has been loaded at run time.

    If no timeline is selected, a new media timeline is created, and the media file is added to the new timeline at time=0s.

  2. You can now configure media-specific properties, and you can modify the media element timeline just as you would modify an animation timeline. For more information, see the topics listed in Animating objects.

    Tip

    A media file is displayed on the timeline as a blue bar representing the duration of playing time. You can view the blue bar by expanding the inserted audio or video in the objects view in the Objects and Timeline panel.

See also

Tasks

Control media using triggers in a timeline

Customize an Expression Encoder template for Silverlight