# Attaching an embedded sound using a var

**URL:** <https://forum.kirupa.com/t/attaching-an-embedded-sound-using-a-var/234586>\
**Category:** flash\
**Created:** [August 3, 2007, 3:07pm UTC](https://forum.kirupa.com/t/attaching-an-embedded-sound-using-a-var/234586 "2007-08-03T15:07:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![costa](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@costa](https://forum.kirupa.com/u/costa)\
**Post date:** [August 3, 2007, 3:07pm UTC](https://forum.kirupa.com/t/attaching-an-embedded-sound-using-a-var/234586/1 "2007-08-03T15:07:03Z")

</div>

[SIZE=3][FONT=Times New Roman]Dear all,[/FONT][/SIZE]

[SIZE=3][FONT=Times New Roman]I want to know if it is possible to attach a sound using a variable as the name of the class. For example[/FONT][/SIZE]

[SIZE=3][FONT=Times New Roman]Normal way[/FONT][/SIZE]

```auto
 
var mySound:embeddedSound = new embeddedSound () 

```

[SIZE=3][FONT=Times New Roman]What I need[/FONT][/SIZE]

```auto
 
var newSound:string = “embedded Sound”
 
var mySound:newSound = new mySound()
 

```

[SIZE=3][FONT=Times New Roman]Is this possible?[/FONT][/SIZE]

[SIZE=3][FONT=Times New Roman]Thanks in advance[/FONT][/SIZE]
