"embed" Element with Flash Parameters

This section provides a tutorial example on how to integrate mp3player into Web pages using 'embed' elements and extra attributes to specify mp3player configuration parameters.

From previous chapters, we also learned that Flash SWF files can be integrated into Web pages using "embed" elements.

I want to try to integrate mp3player in an "embed" element and need to solve the issue on how to specify the special parameter "FlashVars" required by mp3player.

Reading the HTML 5 specification again, I found that "embed" element can support "Any other attribute that has no namespace".

Here is my tutorial example on how to integrate mp3player using an "embed" element:

<html><body>
<!-- mp3player_embed_param.html
 - Copyright (c) 2014, HerongYang.com, All Rights Reserved.
-->

<p>mp3player with "embed" element:</p>
<embed src="player_mp3_maxi.swf"
   width="200" height="20"
   wmode="transparent"
   FlashVars="mp3=Music_Sample.mp3&amp;config=mp3player_config.txt">
</embed>

</body></html>

Surprisingly, both Firefox 3 and IE 8 can play this example correctly as a remote Web page. If you open it as a local file, IE 8 will give you the regular security warning message.

I have included the above code here on this page. If you are reading the Web version of this book, you should be able to see mp3player displayed and you can play it. Otherwise, you will see a static image.

Last update: 2014.

Table of Contents

 About This Book

 Introduction of Adobe Flash

 Adobe Flash Player Plugin for Firefox

 Adobe Flash Player Plugin for Chrome

 Adobe Flash Player Plugin for Safari

 Adobe Flash Player ActiveX for IE

 Using "object" Elements for Flash Files

 Using "embed" Elements for Flash Files

"mp3player" - MP3 Music Player

 Downloading and Testing "mp3player"

 Integrating "mp3player" in Web Pages

 "mp3player" Configuration Parameters

 "mp3player" Controlled by JavaScript Code

 "object" Element with Flash Parameters

 "object" Element with Flash Parameters - Firefox 3

 "object" Element with Flash Parameters - IE 8

"embed" Element with Flash Parameters

 SWFObject - Hidding "object" behind JavaScript

 Flash Player Projector

 SWFTools - SWF File Manipulation Tools

 SWFC Script to Generate Flash SWF Files

 ActionScript Embedded in SWFC Script

 AS3Compile - ActionScript 3 Compiler

 Adobe Flex SDK 4

 SWF File Structure and Tags

 SWF File Processing Rules

 SWF Files for Video and Audio Streams

 Outdated Tutorials

 References

 PDF Printing Version