Bonjour, Je cherche dans le code la fonction qui permet de désactiver la lecture auto de la playlist des fichiers mp3 d'un lecteur si vous pouviez m'indiquer la ligne en question voir le code je galère pas possible merci [code]// Create Sound Object var mp3_player:Sound = new Sound(this); // Set Starting Volume var player_volume:Number = 75; // Shuffle playlist mode on /off var shuffle = false; // Create Playlist Array var play_list:Array = []; // Song position var current_position:Number = 0; // Starting Playing Song Number var current_song_number:Number = 0; // Starting Show Playlist on / off var play_list_open:Boolean = false; // Now playing or Stop Boolean Value var playing_status:Boolean = false; var drag_start:Boolean = false; var move_stop:Boolean = false; // Create mask for play list play_list_mc.setMask(mask_mc); play_list_mc._y = play_list_mc._y-play_list_mc._height; // Player Mute on / off var mute:Boolean = false; // if shuffle mode on, goto shuffle button "on" var goto_shuffle:String = shuffle ? "shuffle_on" : "shuffle_off"; shuffle_mc.gotoAndStop(goto_shuffle); // Create playlist XML var play_list_xml:XML = new XML(); play_list_xml.ignoreWhite = true; play_list_xml.onLoad = function(load_status:Boolean):Void { var nodes:Array = this.firstChild.childNodes; play_list_length = nodes.length; for (var i = 0; i<nodes.length i add all song information to playlist array play_list.push artist:nodes track:nodes goto duplicate songname on function create_play_list if shuffle mode select random number shuffle_playlist else off and play ordinary play_song load xml file play_list_xml.load define text field in var song_name="this.play_list_mc.scroller_mc.mc.song_name_mc.text_mc;" first name info song_name.name_txt.text='play_list[0].track+"' song_name.number_txt.text="01." id this.play_list_mc.scroller_mc.mc.song_name_mc.color_bar_mc.id="0;" for song_name.color_bar_mc.id="i-1;" y position song_name._y="this.play_list_mc.scroller_mc.mc.song_name_mc._y+this.play_list_mc.scroller_mc.mc.song_name_mc._height(i-1);" dynamic song_name.text_mc.name_txt.text='play_list[i-1].track+"' song_name.text_mc.number_txt.text="0" open show distance_y="155;" show_playlist_mc.gotoandstop move down or up content_move function. this is specific stop old mp3_player.stop set start mp3_player.start via streaming mp3_player.loadsound true volume set_volume pause button play_pause_mc.gotoandstop status now playing playing_status="true;" display_song_name_mc.title_txt.text='play_list[song_number].track+"' create time loop display timer="setInterval(display_time," over call play_pause_mc.onrollover="function()" rollover play_pause_mc.onrollout="function()" pressed play_pause_mc.onrelease="function()" controll sound equalizer animation section. sound_animation_mc.gotoandplay save current current_position="mp3_player.position;" continue from paused next next_mc.onrollover="function()" next_mc.gotoandstop rollout next_mc.onrollout="function()" next_mc.onrelease="function()" play_next total display_time="function" get current_time:number="mp3_player.position/1000;" total_time:number="((mp3_player.duration/((mp3_player.getBytesLoaded()/mp3_player.getBytesTotal())100))100)/1000;" convert millisecond second zero current_time_minute:number="add_zero(Math.floor(current_time/60));" current_time_second:number="add_zero(Math.floor(current_time%60));" duration_minute:number="add_zero(Math.floor(total_time/60));" duration_second:number="add_zero(Math.floor(total_time%60));" time_txt.text='current_time_minute+":"+current_time_second+"' arrive end of math.floor>"0") {
// if shuffle mode on
if (shuffle) {
// play random song
shuffle_playlist(current_song_number);
} else {
// play ordinary song
play_next();
}
clearInterval(timer);
}
}
};
// add zero to time function
add_zero = function (num:Number):String {
return String(num).length == 1 ? "0"+num : num;
};
// Define play next song function
play_next = function () {
// check end of playlist
if (current_song_number<play_list.length-1 next song number current_song_number else set to first call play function play_song define random shuffle_playlist="function" var new_song_number:number="Math.floor(Math.random()
play_list.length);" check old diffrent from new while old_song_number new_song_number="Math.floor(Math.random()play_list.length);" calculate loader bar percent loader_status="function" get loaded info amountloaded:number="mp3_player.getBytesLoaded()/mp3_player.getBytesTotal();" width loader.loadbar._width="Math.floor(amountLoaded100);" total length. trueduration="Math.ceil((mp3_player.duration/((mp3_player.getBytesLoaded()/mp3_player.getBytesTotal())100))100);" if false position scrub loader.scrub._x="(mp3_player.position/trueDuration)100;" create empty movie clip for this.createemptymovieclip this.getnexthighestdepth vframe.onenterframe="loader_status;" when press start drag loader.scrub.onpress="function()" drag_start="true;" this.startdrag this._y release stop dragging and loader.scrub.onrelease="loader.scrub.onReleaseOutside=function" loader.scrub.gotoandstop mp3_player.stop totoal time current_position="Math.floor(((loader.scrub._x/100)trueDuration)/1000);" mp3_player.start this.stopdrag loader.scrub.onrollover="function()" loader.scrub.onrollout="function()" over the show playlist button show_playlist_mc.onrollover="function()" show_playlist_mc.gotoandstop rollout show_playlist_mc.onrollout="function()" pressed show_playlist_mc.onrelease="function()" move distance down distance_y="155;" up reverse boolean value play_list_open="!play_list_open;" function.. speed content_move box main scroller function. mc scroll scroll_distance_y:number speed:number move_stop="true;" current_y="target._y;" target.onenterframe="function()" current_scroll_distance="Math.floor(((scroll_distance_y+current_y)-target._y)speed);" scroll_distance_y delete target._y mute mute_mc.onrelease="function()" old_volume="player_volume;" player_volume="0;" set_volume mute_mc.gotoandstop mute_mc.onrollover="function()" mute_mc.onrollout="function()" mp3_player.setvolume volume_control_mc.volume_bar_mc._width="volume_control_mc.slider_mc._x=(player_volume/100)100;" shuffle_mc.onrollover="function()" goto_shuffle:string="shuffle" : shuffle_mc.gotoandstop shuffle_mc.onrollout="function()" shuffle_mc.onrelease="function()" shuffle="!shuffle;"></play_list.length-1></nodes.length>

1 réponse


A la ligne 44 tu lance play_song fonction qui est défini ligne 84 après à toi de modifier le code pour le lancer au click