| View previous topic :: View next topic |
| Author |
Message |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri Jul 25, 2008 10:29 am Post subject: Error #2044: Unhandled IOErrorEvent (Action Script 3.0) |
|
|
I finally got my mp3 player working but if I upload it to the site it doesn't work. If I save it locally it works. I think Flash remembers where you save it so it's getting confused when I just copy/upload it to the site. So I tried instead making it an absolute path (www.domainname.com/foldername/*.mp3 but then I got this error:
| Quote: |
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at flashplayer_fla::MainTimeline/frame1()
|
I'm not really sure whats wrong considering it's not' really telling me what's wrong, but I'm assuming it's this line of code.
| Code: |
var music:Sound = new Sound(new URLRequest("www.domainname.com/foldername/mp3name.mp3"));
|
My full code is:
| Code: |
var music:Sound = new Sound(new URLRequest("www.domainname.com/foldername/mp3name.mp3"));
var sc:SoundChannel;
var IsPlaying:Boolean = false;
stop_btn.addEventListener(MouseEvent.CLICK, stopMusic);
function stopMusic(e:Event):void
{
sc.stop();
IsPlaying = false;
}
play_btn.addEventListener(MouseEvent.CLICK, playMusic);
function playMusic(e:Event):void
{
if (!IsPlaying)
{
sc = music.play();
IsPlaying = true;
}
}
|
And I have to finish this today so help would be very helpful.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Fri Jul 25, 2008 10:51 am Post subject: |
|
|
Use a try and catch block to make sure it's that line. I'm not sure how finicky flash is about URLs, but you might want to try putting http:// in front of the URL.
http://www.actionscript.org/forums/showthread.php3?t=164936
Try splitting up the declaration and loading of the sound. And should it be a SoundChannel or just Sound?
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Fri Jul 25, 2008 11:28 am Post subject: |
|
|
| HalfPrime wrote: | Use a try and catch block to make sure it's that line. I'm not sure how finicky flash is about URLs, but you might want to try putting http:// in front of the URL.
http://www.actionscript.org/forums/showthread.php3?t=164936
Try splitting up the declaration and loading of the sound. And should it be a SoundChannel or just Sound? |
Thanks but I figured it out. It's because I was making it the path relative to the .swf file when really it's the path relative to the .asp file.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
|