-
simple code but error why?
I have a simple code:
myMusic = new Sound(myMusicMc);
myMusic.loadSound("distortion.mp3");
There is a button, on the button there is this event:
on (press) {
myMusic.play();
}
I have created a movieclip myMusicMc
but when i test it I get the following error:
Error opening URL "file:///C|/DOCUME%7E1/SADEKA%7E1/LOCALS%7E1/Temp/distortion.mp3"
why
-
Are you positive the song is in the same file as your .fla?
-
Flash Gordon
I am not sure, either your mp3 is not in the same directory as the swf, that is beeing generated or flash can't resolve the path correctly.
Try saving the fla to d:\test\myFla.fla or whatever, copy the mp3 there and try again.
@ostil: In the same Fla??? why's that?
My letters on the F1 key have faded, how are yours today?
-
Senior Member
The error means it cannot find the file. That url means that i can assume you have not saved the file. Save the file in the same folder, and the problem will go.
-
McUsher,
First of all its Osteel, Ostil is my brother
Well it doesnt really matter if you say .fla or swf since both files will be in the same folder. But I suppose I should have said swf instead to avoid confusion
Sorry
-
Flash Gordon
Oh sorry, i am mixing you two up all the time
I normally don't publish in same dir as the fla, but that doesn't matter.
I just thought (as you said in the same _file_ as the fla) that you were
thinking of linkage.. i bet you wanted to say _folder_ instead
My letters on the F1 key have faded, how are yours today?
-
Last edited by Osteel; 12-15-2005 at 02:06 PM.
-
Haha ok ok
*Ahem*
FOLDER!
ps , dont worry everyone else mixes us up as well
-
Flash Gordon
tbh it was a mix-up on purpose, as u mixed up File 'n Folder..
My letters on the F1 key have faded, how are yours today?
-
Thanks Guys:
McUsher, Osteel and corkysurprise
I have saved the sound "distortion.mp3" file in the same directory as soun-tyro.fla. Now I get no "file URL error" however now the sound does not play. Sound card is not on mute and sound volume is on.
-
Hey,
Just noticed something. Try moving the code to your main timeline ...
code:
myMusic = new Sound(myMusicMc);
myMusic.loadSound("distortion.mp3");
myButton.onRelease = function(){
myMusic.play();
}
Try that
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|