PDA

View Full Version : Display ID3 info in flash player


iraheinichen
04-14-2010, 10:04 PM
Hi guys,

So I'm modifying a flash player that I've used to stream from a radio station i've worked for, but now the player is being used for a static mp3 on-demmand stream

The issue i have is that the current action script is getting "now playing" info from a php generator from the live stream...what i need is simply a script that will read the mp3 ID3 info

all i need to show up is: Artist - Track

below is the top code and the player...if you need everything, i'm happy to post it, it's just 464 lines long :P

the current nowplaying actions have been put in bold so you can see what i need to change

public class FlashRadioPlayer extends MovieClip
{
public var stopButInst:MovieClip;
public var muteButInst:MovieClip;
var radioColor:uint;
public var logoLinkInst:MovieClip;
var soundRadio:Sound;
var playing:Number = 0;
public var lineVol:MovieClip;
var logoLink:Object;
var timeForBuffering:Number = 2000;
var soundRadioVolume:SoundTransform;
var volChanger:MovieClip;
var curVol:Number = 0.5;
var nowPlaying:TextField;
var forMute:Object;
public var playButInst:MovieClip;
var numStream:Number = 0;
var playBut:Object;
public var nowPlayingInst:MovieClip;
public var back:MovieClip;
var stopBut:Object;
var soundRadioChannel:SoundChannel;
var timer:Number = 0;
public var detachButInst:MovieClip;
public var volChangerInst:MovieClip;
var urlSite:String = "http://www.freshproduceonline.com";
var _xml:XML;
var url:String;
var autoPlay:Boolean;
var detacher:Boolean;
var checkerTOut:uint;
var checkRespStreamTimer:uint;
var muteBut:Object;
var moveTextTo:String = "left";
var timeChecking:Number = 600000;
var nowPlayingUrl:Object = "http://www.friskyradio.com/sc_script/nowplaying.php";
public var forMuteInst:MovieClip;
var detachBut:Object;
var checkerInt:uint;

public function FlashRadioPlayer()
{
var _loc_1:URLLoader = null;
var _loc_2:* = undefined;
curVol = 0.5;
timeForBuffering = 2000;
playing = 0;
urlSite = "http://www.freshproduceonline.com";
timeChecking = 1000 * 60 * 10;
nowPlayingUrl = "http://www.friskyradio.com/sc_script/nowplaying.php";
moveTextTo = "left";
timer = 0;
numStream = 0;
_loc_1 = new URLLoader(new URLRequest("playXml.xml"));
_loc_1.addEventListener(Event.COMPLETE, playXmlLoaded);
_loc_1.addEventListener(IOErrorEvent.IO_ERROR, playXmlLoadError);
radioColor = loaderInfo.parameters.color || 15616404;
soundRadioChannel = new SoundChannel();
soundRadioVolume = new SoundTransform(curVol, 0);
_loc_2 = getChildByName("nowPlayingInst");
nowPlaying = _loc_2.getChildByName("nowPlayingText") as TextField;
playBut = getChildByName("playButInst");
stopBut = getChildByName("stopButInst");
volChanger = getChildByName("volChangerInst") as MovieClip;
muteBut = getChildByName("muteButInst");
forMute = getChildByName("forMuteInst");
logoLink = getChildByName("logoLinkInst");
logoLink.buttonMode = true;
logoLink.addEventListener(MouseEvent.CLICK, goToSite);
detachBut = getChildByName("detachButInst");
detachBut.buttonMode = true;
detachBut.addEventListener(MouseEvent.CLICK, detaching);
changeColor();
detacher = loaderInfo.parameters.detacher || false;
autoPlay = loaderInfo.parameters.autoPlay || false;
ExternalInterface.addCallback("autoPlay", autoPlaying);
return;
}// end function

thanks guys -- i literally have no idea what i'm doing, so any help is wonderful :P

iraheinichen
04-16-2010, 08:56 PM
anyone?