Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Load sound from an SWC? #27

Open
ghost opened this issue May 29, 2015 · 2 comments
Open

How to Load sound from an SWC? #27

ghost opened this issue May 29, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented May 29, 2015

I'm confused on how I could load a Soundfile from an SWC library.

I started of my using:
private var SoundAS:SoundManager;

and thought I could then add the MP3 from my SWC like so:
SoundAS.addSound("found", mp3found);

But that didnt worked. Any tips?

@nimohe
Copy link

nimohe commented May 31, 2015

you should set a As-link name in flash library-panel before you export SWC ,that name you can set "mp3found".then you can use it .
1.SoundAS.addSound("found", new mp3found());
2.SoundAS.play("found");

@ghost
Copy link
Author

ghost commented May 31, 2015

That worked very nice. Maybe you can paste this example into the Readme.md, as there are allready a great number of exmaples included - just not the SWC one :)

Very handy class. Thank you very much.

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant