Ok, lets start with the first one.
This player will load the music from external file.
1. So, make a new flash document, size 300x200.
2. Name layer1 "text" and write the name of your player or track you want.
3. Create new layer and name it "buttons"
4.1 Load play, pause and stop buttons from common libraries (Window/Common Libraries/Buttons -> Playback) or create your own buttons.
4.2 Select the play button, open actions panel and type:
| Code: |
| on(release){ sound.start(cue); } |
4.3 Select the pause button, open actions panel and type:
| Code: |
| on(release){ cue=Math.round (sound.position/1000); sound.stop(); } |
4.4 Select the stop button, open actions panel and type:
| Code: |
| on(press){ stopAllSounds(); cue=0; } |
5. Create new layer and name it "actions"
6. On the first frame, open the actions panel and type:
| Code: |
| sound=new Sound(); sound.loadSound("mymusic.mp3"); stop(); |
7. Now save this, and move your music file in the same directory as the .swf
Then just test how it works !
discuss this topic to forum
