Hi,
I've got a pretty simple mp3 player in Flash made with AS3 and XML. You can see it here http://renegadesoundwave.net (go to the Radio page) and two things I don't understand: 1. when you click a button it first moves to the x = 0 position mark even though in the code I tell it to go to -332 position. 2. the 2nd one listed, when you press play, it works fine but if you click the first one listed, it doesn't play.. Most of my code of my external AS file is below.


Actionscript Code:
private var playlistClip:PlaylistClip;
        private var playlistClips:Array = new Array();
        private var trackClip:TrackClip;
        private var trackClips:Array;
        private var playlistDescClip:PlaylistDescClip;
       
        private var i:uint;
        private var j:uint;
        private var onPage:uint;
        private var _color:ColorTransform;
        private var playlistImageLoader:Loader = new Loader();
        private var playlistImageNum:uint;
        private var localRef:FileReference = new FileReference();
        private var scrubberRect:Rectangle = new Rectangle(-332, -17, 393, 0);
        private var volumerRect:Rectangle = new Rectangle(173, -17, 94, 0);
        public var s:Sound = new Sound();
        public var soundTrans:SoundTransform;
        public var channel:SoundChannel;
        private var pausePoint:Number = 0;
        private var onPlaylist:uint;
        private var onTrack:uint;
        private var approxLength:Number;
        private var percentBuffered:Number;


//under the public function:
            s.load(new URLRequest(_xml.radio.playlist[0].file));
            soundTrans = new SoundTransform(0.7);
            channel = s.play(pausePoint, 0, soundTrans);
            channel.stop();


       
       
        private function endOfTrack(e:Event):void {
            // track end - play next track in line
            onPlaylist++;
            if (onPlaylist == _xml.radio.playlist.length()) {
                onPlaylist = 0;
            }
            s = new Sound();
            s.load(new URLRequest(_xml.radio.playlist[onPlaylist].file));
            channel = s.play(0, 0, soundTrans);
            channel.addEventListener(Event.SOUND_COMPLETE, endOfTrack);
            _base.siteclip.player.nametxt.text = _xml.radio.playlist[onPlaylist].name;
        }
       
       
       
        private function ppClick(e:MouseEvent):void {
            if (_base.siteclip.player.ppbutn.currentFrame == 1) {
                // PAUSED > PLAY IT
                _base.siteclip.player.ppbutn.gotoAndStop(2);
                channel = s.play(pausePoint, 0, soundTrans);
                channel.addEventListener(Event.SOUND_COMPLETE, endOfTrack);
                _base.siteclip.player.scrubber.addEventListener(Event.ENTER_FRAME, scrubberMove);
            } else {
                _base.siteclip.player.scrubber.removeEventListener(Event.ENTER_FRAME, scrubberMove);
                _base.siteclip.player.ppbutn.gotoAndStop(1);
                channel.stop();
                pausePoint = channel.position;
            }
        }
       
       
       
        private function scrubberMove(e:Event):void {
            percentBuffered = (393 * s.bytesLoaded / s.bytesTotal);
            approxLength = Math.ceil(s.length / (s.bytesLoaded / s.bytesTotal));
            var percentPlayed:Number = Math.floor(393 * (channel.position / approxLength));
            if (channel == null || s == null) {
                _base.siteclip.player.scrubber.x = -332;
            } else {
                _base.siteclip.player.scrubber.x = percentPlayed - 332;
            }
            if (_base.siteclip.player.scrubber.x < -332) {
                _base.siteclip.player.scrubber.x = -332;
            }
            var minutes = Math.floor(channel.position / 1000 / 60);
            var seconds = Math.floor(channel.position / 1000) % 60;
            if (seconds < 10) {
                _base.siteclip.player.timetxt.text = minutes + ":0" + seconds;
            } else {
                _base.siteclip.player.timetxt.text = minutes + ":" + seconds;
            }
           
        }

       
       
       
        private function scrubberDown(e:MouseEvent):void {
            if (_base.siteclip.player.ppbutn.currentFrame == 2) {
                _base.siteclip.player.scrubber.removeEventListener(Event.ENTER_FRAME, scrubberMove);
                channel.stop();
            }
            _base.siteclip.player.scrubber.startDrag(false, scrubberRect);
            _base.stage.addEventListener(MouseEvent.MOUSE_UP, scrubberUp);
        }
       
       
       
        private function scrubberUp(e:MouseEvent):void {
            _base.stage.removeEventListener(MouseEvent.MOUSE_UP, scrubberUp);
            _base.siteclip.player.scrubber.stopDrag();
            pausePoint = (_base.siteclip.player.scrubber.x + 332) / 394 * approxLength;
            if (pausePoint > s.length) {
                pausePoint = s.length;
            }
            if (_base.siteclip.player.ppbutn.currentFrame == 2) {
                channel = s.play(pausePoint, 0, soundTrans);
                channel.addEventListener(Event.SOUND_COMPLETE, endOfTrack);
                _base.siteclip.player.scrubber.addEventListener(Event.ENTER_FRAME, scrubberMove);
            }
        }



       
        private function playlistPlayClick(e:MouseEvent):void {
            //onTrack = 0;
            onPlaylist = e.currentTarget.parent.num;
            if (s.isBuffering) {
                try {
                    s.close();
                } catch (e:Error) {
                }
            } else {
                channel.stop();
            }
            _base.siteclip.player.scrubber.x = -332;
            s = new Sound();
            s.load(new URLRequest(_xml.radio.playlist[onPlaylist].file));
            channel = s.play(0, 0, soundTrans);
            channel.addEventListener(Event.SOUND_COMPLETE, endOfTrack);
            _base.siteclip.player.nametxt.text = _xml.radio.playlist[onPlaylist].name;
            if (_base.siteclip.player.ppbutn.currentFrame == 1) {
                _base.siteclip.player.ppbutn.gotoAndStop(2);
                _base.siteclip.player.scrubber.addEventListener(Event.ENTER_FRAME, scrubberMove);
            }
        }