# I need help Fast!

**URL:** <https://forum.kirupa.com/t/i-need-help-fast/21455>\
**Category:** Uncategorized\
**Created:** [May 21, 2003, 7:43pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455 "2003-05-21T19:43:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![houston97](https://avatars.discourse-cdn.com/v4/letter/h/71c47a/32.png) [@houston97](https://forum.kirupa.com/u/houston97)\
**Post date:** [May 21, 2003, 7:43pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/1 "2003-05-21T19:43:26Z")

</div>

I am on a deadline for a website I am working on for a local rock band. I have everything done but their mp3 page. I have created a nice looking car radio cd player for the page and it has several buttons for track selection numbered 1-5. When these buttons are hit I would like for them to play a streaming MP3 file. I can not for the life of me get the Mp3 to attach to the button. I have read all the tutorials and still have had no help. Can anyone help???

Any help will be greatly appreciated.  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 21, 2003, 8:25pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/2 "2003-05-21T20:25:12Z")

</div>

[http://www.flashkit.com/tutorials/Utilities/make\_you-roozbeh\_-919/index.php](http://www.flashkit.com/tutorials/Utilities/make_you-roozbeh_-919/index.php)

post a part of the fla if you want… it will help, or show us your code…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 21, 2003, 8:46pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/3 "2003-05-21T20:46:11Z")

</div>

OK. Here is the code I am working with. Maybe I am very confused cuz I am so tired. If someone can help me out with the rest of the code it would be appreciated. This code is only for the first button.

n (press) {  
if (Number(Fmradio) == 0) {  
tellTarget ("/meny") {  
gotoAndPlay(“Cdinsert”);  
menytext = “You Give Love a Bad Name”;  
}  
} else if (Number(Fmradio) == 1) {  
if (Number(radiobutton1) == 0) {  
tellTarget ("/meny") {  
gotoAndPlay(“start”);  
menytext = “The //Rave Channel\\ 12.5 hz. We are playing Rave music none stop and if you like rave music, this is the place for you. Comming up: DJ Hour with Mike and Fritz, so stay tuned for more info and music.”;  
}  
tellTarget ("/radiobutton1") {  
gotoAndStop(“pressed”);  
}  
tellTarget ("/radiobutton2") {  
gotoAndStop(“standard”);  
}  
tellTarget ("/radiobutton3") {  
gotoAndStop(“standard”);  
}  
tellTarget ("/radiobutton4") {  
gotoAndStop(“standard”);  
}  
tellTarget ("/radiobutton5") {  
gotoAndStop(“standard”);  
}  
} else if (Number(radiobutton1) == 1) {  
tellTarget ("/radiobutton1") {  
gotoAndStop(“standard”);  
}  
}  
}  
}  
on (release) {

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 21, 2003, 8:58pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/4 "2003-05-21T20:58:11Z")

</div>

maybe I have too much here? I don’t know anymore. Sleep would be good right now LOL. Help!!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 21, 2003, 9:07pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/5 "2003-05-21T21:07:28Z")

</div>

are your mp3’s embedded in the swf,

or are you using any code that looks like this:  
mySound=new Sound();  
mySound.attachSound(“song.mp3”);  
mySound.play();

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 21, 2003, 9:10pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/6 "2003-05-21T21:10:28Z")

</div>

My mp3s are currently residing in the library. the code is what I originally tried to use as stated in the kirupa forum but it did not work.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 21, 2003, 9:31pm UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/7 "2003-05-21T21:31:15Z")

</div>

I am currently online and if anyone can help me I am also on with my msn messenger and will gladly give access to the files that I am referring to. [khemmig@msn.com](mailto:khemmig@msn.com).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 22, 2003, 1:58am UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/8 "2003-05-22T01:58:31Z")

</div>

Alright, first of all, do you have your mp3’s exported for ActionScript as per “linkage” reached by right-clicking the mp3 and clicking “linkage” then selecting the “Export for ActionScript” checkbox. If you don’t, that’s your problem, so give your mp3 a suitable name and…

```php

//like frame 0
mySound=new Sound();
//now what ever frame your attaching 
//the mp3 on or button or whatever
mySound.attachSound("instanceNameYouExportedTheMP3As");
mySound.play();

```

Alright, that should be pretty self explanatory, but here’s a practical application from one of my .flas:

```php

//_root.exhib is our sound object
_root.exhib = new Sound();
//'ex' is the name I have in the Export for AS thing
_root.exhib.attachSound("ex");
_root.exhib.start(0, 1);
//and now the onSoundComplete thing
//this one was used to loop, but yours would probably
//want to make it stop.
_root.exhib.onSoundComplete = function() {
     //Well, it's already loaded, so let's play it again...
     //note that starting it on second 20 isn't important 
     //for you, but it was for the mp3 I was looping.
    _root.exhib.start(20, 1);
};

```

Anyway, hope that helped,  
–Elios

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 22, 2003, 2:29am UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/9 "2003-05-22T02:29:10Z")

</div>

I wish that it had… I am giving up on this cuz I belive that I am in over my head. The design was easy it is actually getting it to work that I can’t do.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 22, 2003, 2:41am UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/10 "2003-05-22T02:41:20Z")

</div>

I have attached the fla to see if anyone can really help out. as much as I want to give up I can’t

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 22, 2003, 2:42am UTC](https://forum.kirupa.com/t/i-need-help-fast/21455/11 "2003-05-22T02:42:32Z")

</div>

ok too large… no help with that lol
