View Single Post
  #7  
Old 08-13-2005, 05:52 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And this can be made so that each member has it so that if he states a song to play in his profile it can be played through there?

ok anyone know how i can take this code

PHP Code:
//--------------------------------------------------------------------------
// location of the playlist if no html parameter is found
// change "playlist.xml" if you want another filename ..
//--------------------------------------------------------------------------
_root.playlist == undefined playlist "mp3player.xml" playlist=_root.playlist;

//--------------------------------------------------------------------------
// below here it's all code and code ..
//--------------------------------------------------------------------------


// stage variables
Stage.showMenu false;
Stage.scaleMode "noScale";
stop();

// player variables
volume 90;
current_song 1;
top.equalizer._visible=0;

// playlist loading
data_xml = new XML();
data_xml.ignoreWhite true;
data_xml.onLoad loadData;
data_xml.load(playlist);


// parsing all xml data into flash
function loadData(success) {
    if (
success) {
        
// showdisplay and playlist toggles
        
showDisplay this.firstChild.attributes.showDisplay;
        if (
showDisplay == "yes") {
            
top.easeY(toppos);
            
topup false;
            
display_btn._rotation+=180; }
        
showPlaylist this.firstChild.attributes.showPlaylist;
        if (
showPlaylist == "yes") {
            
bot.easeY(botpos);
            
botup false;
            
list_btn._rotation+=180; }
        
// getting all titles and filenames
        
aPath = new Array();
        
songTitel = new Array();
        
audioTracks = new Array();
        
audioTracks.shuffle();
        
audioTracks this.firstChild.childNodes;
        
song_total audioTracks.length;        
        for (var 
0i<song_totali++) {
            
aPath.push(audioTracks[i].attributes.path);
            
songTitel.push(audioTracks[i].attributes.title);
            
// buiding playlist buttons
            
bot.playlist.btn.duplicateMovieClip("btn"+ii);
            
bot.playlist["btn"+i]._y bot.playlist.btn._y+i*int(bot.playlist.btn._height) +i;
            
bot.playlist["btn"+i].txt checkDigits(i+1)+". "+songTitel[i];
            
bot.playlist["btn"+i].hit.onPress = function() {
                
listClick(this._parent.getDepth()+1); }; 
        }
        
//checking autostart mode
        
autoStart this.firstChild.attributes.autoStart;
        if (
autoStart == "yes") {
            
playSong(); 
            
play_btn._visible 0;
        } else if (
autoStart == "no") {
            
play_btn._visible 1;
            
pause_btn._visible 0;
        } else if (
autoStart == "random") {
            
current_song random(song_total)+1;
            
playSong(); 
            
play_btn._visible 0;
        } else {
            
current_song int(this.firstChild.attributes.autoStart);
            
playSong(); 
            
play_btn._visible 0; } }
    
// done ! all loaded succesfully. purging trash
    
delete audioTracks;
    
delete data_xml;}

// list button
function listClick(prm) {
    
delete pausepos;
    
current_song prm;
    
MySound.stop();
    
playSong(); }
    
// list scroller
bot.list_bg.onEnterFrame = function() {
    if (
hitTest_root._xmouse_root._ymousetrue) && this._parent.playlist._height this._height ) {
        
ymin this._y+this._height this._parent.playlist._height;
        
ymax this._y+3;
        
conv = (this._ymouse -15)*1.3/this._height;
        
conv conv null;
        
conv conv null;
        
this._parent.playlist.easeY (ymax conv*(ymax-ymin)); } }; 
bot.playlist.setMask(bot.list_bg);


// play function
function playSong() {
    
AudioPath aPath[current_song-1];
    
// checking for pause > start from there
    
if (pausePos>0) {
        
top.equalizer._visible 1;
        
MySound.start(pausePos0);
        
pausePos 0;
    
// startup new sound
    
} else {
        
MySound = new Sound();
        
MySound.setVolume(volume);
        
MySound.loadSound(AudioPathtrue);
        
MySound.onSoundComplete = function() {
            
top.equalizer._visible 0;
            if (
autoStart == "random") {
                
current_song random(song_total)+1;
            } else {
                
current_song == song_total current_song current_song++;
            }
            
playSong(); };
        
// check loading bar
        
top.track_load.onEnterFrame = function() {
            
total this._parent._parent.MySound.getBytesTotal();
            
geladen this._parent._parent.MySound.getBytesLoaded();
            if (
geladen != total) {
                
this._parent.load_display Math.round((geladen*100/total))+"% Loaded";
                
this._xscale Math.round((geladen*100/total));
            } else {
                
this._xscale 100;
                
top.equalizer._visible 1;
                
delete this.onEnterFrame;
                
delete this._parent.load_display; } }; }
    
// switch paly/pause buttons
    
play_btn._visible 0;
    
pause_btn._visible 1; }
    
    
// play button
play_btn.onRelease = function() {
    
playSong(); };
    
    
// pause button
pause_btn.onRelease = function() {
    
this._visible 0;
    
play_btn._visible 1;
    
pausePos MySound.position/1000;
    
MySound.stop();
    
top.equalizer._visible=0;  };
    
    
// next button
next_btn.onRelease = function() {
    
delete pausepos;
    
current_song == song_total current_song 1current_song++;
    
MySound.stop();
    
playSong(); };
    
    
// previous button
prev_btn.onRelease = function() {
    
delete pausepos;
    
current_song == current_song song_totalcurrent_song--;
    
MySound.stop();
    
playSong(); };

    
// display toggle button
top.setMask(top_mask);
toppos top._y;
top._y int(toppos top_mask._height 29);
topup true;

display_btn.onPress = function() {
    if(
topup == true) {
        
top.easeY(toppos);
        
topup false; }
    else {
        
top.easeY(int(toppos top_mask._height -27));
        
topup true; }
    
this._rotation += 180; };
        
// playlist toggle button

bot.setMask(bot_mask);
botpos bot._y;
bot._y botpos bot.list_bg._height -6;
botup true;

list_btn.onPress = function() {
    if(
botup == true) {
        
bot.easeY(botpos);
        
botup false; }
    else {
        
bot.easeY(botpos bot.list_bg._height -6);
        
botup true; }
    
this._rotation += 180; };
        
// drag button functionality
drag_btn.onPress = function() {
    
startDrag(this._parent); };
drag_btn.onRelease drag_btn.onReleaseOutside=function () {
    
stopDrag(); };

// copyright button
copy.onPress = function() {
  
getURL("http://www.jeroenwijering.com/?item=Flash+Mp3+Player","_blank"); }
    
// updating time display 
this.onEnterFrame = function() {
    
dur int(MySound.duration/1000);
    
pos int(MySound.position/1000);
    
playTime = {};
    
playTime.minutes int((pos)/60);
    
playTime.seconds int((pos)%60);
    
playTime.total checkDigits(playTime.minutes)+":"+checkDigits(playTime.seconds);
    
trackTime = {};
    
trackTime.minutes int(dur/60);
    
trackTime.seconds int(dur%60);
    
trackTime.total checkDigits(trackTime.minutes)+":"+checkDigits(trackTime.seconds);
    if (
top.load_display == undefined) {
        
top.display playTime.total+" / "+trackTime.total;
    } else {
        
top.display top.load_display; }
    if (
top.trackDrag != true) {
        
prozent pos*100/dur;
        
top.track_play._xscale prozent; } };

// prefixing a 0 to the time
function checkDigits(toCheck) {
    return (
toCheck<10) ? toCheck="0"+toCheck toCheck; }
    
    
// track progress slider functions
top.track_back.onPress = function() {
    
this._parent.trackDrag true;
    
this._parent.track_play.onEnterFrame = function() {
        
perc = (this._parent._xmouse-this._parent.track_back._x)/this._parent.track_back._width;
        
max this._parent.track_load._width/this._parent.track_back._width;
        
perc max perc maxnull;
        
perc 0.01 perc 0.01null;
        
this._width this._parent.track_back._width*perc;
        
this._parent._parent.pausePos = (perc*this._parent._parent.MySound.duration/1000); }; };
top.track_back.onRelease top.track_back.onReleaseOutside = function () {
    
delete this._parent.track_play.onEnterFrame;
    
this._parent.trackDrag false;
    
MySound.stop();
    
playSong(); };

    
// volume slider functions
vol_back.onPress = function() {
    
vol_front.onEnterFrame = function() {
        
perc = (_xmouse-vol_back._x)/vol_back._width;
        
perc 0.95 perc 1null
        
perc 0.05 perc 0null
        
this._width vol_back._width*perc;
        
volume Math.round(perc*100);
        
MySound.setVolume(volume);
        
top.equalizer._yscale volume; }; };
vol_back.onRelease vol_back.onReleaseOutside=function () {
    
delete vol_front.onEnterFrame; };
vol_front.setMask(vol_mask);

// drawing equalizer in actionscript
top.equalizer.setMask(top.eq_mask);
top.equalizer.onEnterFrame = function() {
    
i++;
    
this.createEmptyMovieClip("graph"+ii);
    
with(this["graph"+i]) {
        
_x 0;
        
_y 0;
        
beginFill(0x66666650);
        
moveTo(0,0);
        for (
j=0j36j++) {
            
random(12)+8;
            
lineTo(j*6,-1);
            
lineTo(j*6,-z);
            
lineTo(j*6+4,-z);
            
lineTo(j*6+4,-1);
            
lineTo(j*6,-1); }
        
lineTo(j*6,0);
        
lineTo(0,0);
        
endFill(); }
    
>= i=0null; };

    
// scrolling the display song title
function scrollTitle() {
    
top.title.txt.autoSize true;
    if (
songTitel[current_song-1].length 20) {
        
top.title.txt.text songTitel[current_song-1]+"     "+songTitel[current_song-1];
        
top.title._x+top.title._width/+4top.title_mask._x top.title._x top.title_mask._x top.title._x--; } 
    else {
        
top.title.txt.text songTitel[current_song-1];
        
top.title._x top.title_mask._x-3; } }
top.title.setMask(top.title_mask);
setInterval(scrollTitle40);


// easing display and playlist movement
MovieClip.prototype.easeY = function(t) {
    
this.onEnterFrame = function() {
        
this._y int(t-(t-this._y)/1.5);
        if (
this._y>t-&& this._y<t+1) {
            
delete this.onEnterFrame; } }; }; 
That was found in a .fla file

And make it so that instead of taking variables from the .xml file, it takes it from the memberinfo template? Or how to make it in any way so that i can user $post[fieldx]
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01332 seconds
  • Memory Usage 2,048KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete