Link to home
Create AccountLog in
Avatar of ForLoop5
ForLoop5Flag for United States of America

asked on

How can I make this script play a file in my library?

I have this script and it plays a sound from my server.  I would like it o play a sound from my library instead.  I set the linkage on the the sound and then I modified the url request part to play the file in the library by the linkage name but I kept getting errors.  Can you show me how to play a file from the library instead.  
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

The error is probably "Access Denied"??  Scripts on web pages are not normally allowed to access files on your computer.
you should download some flash tutorials which has audio in them it should be simple if its not playing in your browser sometime security settings prevent that
Avatar of jediborre

If its in AS2 should not be the problem in AS3  maybe the code is wrong
Avatar of ForLoop5


the file si snot on my local computer.  It is in the library of the flash file.  I forgot to put the code in the question


             function player6(event:MouseEvent){
                  // Wave clip
                  // Load sample MP3...
                  mp3Samples = new ByteArray();
                  mp3Sample = new Sound(new URLRequest(""));
                  mp3Sample.addEventListener(Event.COMPLETE, loadHandler);
                  // Update screen every frame

Can you help me change this to play a file from my library with the linkage name of "soud55"
Avatar of blue-genie
Flag of South Africa image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account