Search code examples
flashactionscriptmp3

Flash/ActionScript - Use .mp3 file in library in a movieclip


I've imported a mp3 file into the library and made an actionscript class, but i can't access is in a movieclip.

EDIT: I'm using Adobe AIR, because i want to compile it as an Android Application


Solution

  • set AS Linkage for your sound (in library panel)

    enter image description here

    then paste this code in your movieClip (first keyframe)

    var snd:Snd=new Snd();
    snd.play();
    

    hope it helps