• home
  • forum
  • my
  • kt
  • download
  • Simple MP3 Player

    Author: 2007-06-09 14:31:38 From:

    Since I couldnt find any music player tutorials here, I tought I could share few simple ones.

    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

    relation tutorial

    No information

    Category

      3D (36)
      Math Physics (18)
      3rd Party (10)
      Navigation (70)
      Actionscripting (228)
      Optimization (17)
      Animation (166)
      Projector (11)
      Audio (54)
      Special Effects (170)
      Backend (26)
      Text Effects (92)
      Drawing (34)
      Tips and Techniques (58)
      Dynamic Content (38)
      Tricks (8)
      Games (114)
      Utilities (24)
      Getting Started (99)
      Video (59)
      Interactivity (48)
      Web Design (37)

    New

    Hot