# Should I embedded a swf file in html page in order to solve this problem?

**URL:** https://forum.kirupa.com/t/should-i-embedded-a-swf-file-in-html-page-in-order-to-solve-this-problem/156634
**Category:** flash
**Created:** [July 27, 2005, 5:12am UTC](https://forum.kirupa.com/t/should-i-embedded-a-swf-file-in-html-page-in-order-to-solve-this-problem/156634 "2005-07-27T05:12:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![apple](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@apple](https://forum.kirupa.com/u/apple)
#### Post date: [July 27, 2005, 5:12am UTC](https://forum.kirupa.com/t/should-i-embedded-a-swf-file-in-html-page-in-order-to-solve-this-problem/156634/1 "2005-07-27T05:12:38Z")

</div>

I am having a problem getting a background sound to play in all the web browsers.

Actually what I would like to do is a sound should be played auotmatically once a web page is loaded without clicking on anything to play the sound. I have used the tag and this is only works fine in IE, not for other web browsers. So to solve the problem, I have tried a way which is imported the sound in flash and save as swf file then embedded the swf file in html. So could I use this way to do it or is there any way beside this?

I have tried one example which I have embed the swf file into hml page. But the problem is no sound is played when I opened the page. Below are the code for HTML and action script.

```auto
<html>
<head>
</head>
<body>
<object type="application/x-shockwave-flash" data="testing.swf" width="0" height="0">
<param name="movie" value="testing.swf">
<param name="quality" value="high">
</object>
<title>Testing with sound</title>
To play a background sound.
</body>
</html>

```

```auto
var dlg:Sound = new Sound();
dlg.loadSound("Testing.mp3", true);

```

Hope someone could give me some idea.

Thanks in advance.
