Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

68 users online



Flash Signature

Flash Signature

Currently viewing this thread: 1 (0 members and 1 guests)


exiot

exiot

Acoustic Session
Status: Offline!

Flash Signature

Hi, I was wondering if it is possible to make a flash signature displaying what you are currently listening to on a program such as Windows Media Player, does anyone have any links to a tutorial?

ice-tray

ice-tray

Neversidian
Status: Offline!

dunno about flash, but it can be done by image, search google..

___________________

http://img128.echo.cx/img128/6298/mysig0vz.jpg
Grand Theft Auto: San Andreas - Best GTA Version. Have you got it?

Musoka

Musoka

Freelance Designer
Status: Offline!

http://www.cc.jyu.fi/~ltnevala/nowplaying/index.php

Thats the tutorial/plugin for Winamp.

To do it in Flash you'd have to set a onEnterFrame to connect to the PHP file and get the variables. Then set them to text fields. Though that would be a little CPU hog, you'd have to set intervals for the onEnterFrame to start, rather than constantly run.

___________________

http://img290.echo.cx/img290/9808/emoteheadphonessig611ui.jpg

devonair

devonair

Neverside Newbie
Status: Offline!

hey exiot,

out of curiousity and boredom I downloaded the plugin from the link Musoka posted (cool post, btw), and played around a bit and came up with an "easy" way to do this in flash.. hopefully you're fairly flash and xml savvy, but here's what to do.. In the np_templates directoy created inside your winamp directory create a new html file named xmlTemplate.html and just copy and paste this into it:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<songInfo>
<song>
<artist>[np:Artist1]</artist>
<title>[np:Title1]</title>
<album>[np:Album1]</album>
</song>
<song>
<artist>[np:Artist2]</artist>
<title>[np:Title2]</title>
<album>[np:Album2]</album>
</song>
<song>
<artist>[np:Artist3]</artist>
<title>[np:Title3]</title>
<album>[np:Album3]</album>
</song>
<song>
<artist>[np:Artist4]</artist>
<title>[np:Title4]</title>
<album>[np:Album4]</album>
</song>
<song>
<artist>[np:Artist5]</artist>
<title>[np:Title5]</title>
<album>[np:Album5]</album>
</song>
</songInfo>

in the plugin options in winamp set that xmlTemplate.html as your html template and have it output an HTML file named "np.html" and have it FTP'd to the server/directory of your choice..

Now, in Flash, you can use something like this (this is ACTIONSCRIPT - not PHP):

PHP:

<?php
var nowPlaying:XML = new XML();
nowPlaying.ignoreWhite true;
nowPlaying.onLoad = function(success) {
    if (
success) {
        var 
mySongList:String "<b><u>Currently listening to:</u></b>\n";
        var 
myList:Array = this.firstChild.childNodes;
        var 
listLength:Number myList.length;
        for (var 
0listLengthi++) {
            if (
== 1) {
                
mySongList += "\n<b><u>Previously:</u></b>\n";
            }
            var 
mySong:Array = myList[i].childNodes;
            var 
songLength:Number mySong.length;
            
mySongList += "\n";
            for (var 
0songLengthn++) {
                if (
mySong[n].firstChild != null) {
                    
mySongList += mySong[n].nodeName ": ";
                    
mySongList += mySong[n].firstChild "\n";
                }
            }
        }
        
songList_txt.htmlText mySongList;
    } else {
        
trace("couldn't load that ****.");
    }
};
//  point this to correct directoy...
nowPlaying.load("np.html?noCache="+Math.random()*9999);
?>

Your final output to your html enabled text field named "songList_txt" will look like this:

Quote:

Currently listening to:

artist: Nick Cave & The Bad Seeds
title: Hard on for Love
album: Your Funeral...My Trial

Previously:

artist: Nick Cave & The Bad Seeds
title: Jacks Shadow
album: Your Funeral...My Trial

artist: The Velvet Underground
title: Heroin
album: The Best Of The Velvet Underground

I hope that helps you out.. I know it's a bit sketchy, but it's a start.. someday if I have some time and someone needs it, I'll write a tutorial proper..

d.

edit: forgot to mention - you'll need to reload that xml on occasion with a setInterval as Musoka was saying.. Unless you're listening to very short songs a 5 minute interval or so should suffice..

___________________

obod | weapons of mass dysfunction

Last edited by devonair, July 3rd, 2005 09:13 PM (Edited 3 times)

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0087 seconds.