# ? about Kirupa MP3 player song title not showing in OAS

**URL:** <https://forum.kirupa.com/t/about-kirupa-mp3-player-song-title-not-showing-in-oas/179306>\
**Category:** flash\
**Created:** [February 18, 2006, 5:23pm UTC](https://forum.kirupa.com/t/about-kirupa-mp3-player-song-title-not-showing-in-oas/179306 "2006-02-18T17:23:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![somnamblst](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@somnamblst](https://forum.kirupa.com/u/somnamblst)\
**Post date:** [February 18, 2006, 5:23pm UTC](https://forum.kirupa.com/t/about-kirupa-mp3-player-song-title-not-showing-in-oas/179306/1 "2006-02-18T17:23:10Z")

</div>

I have implemented the MP3 player to be part of an ad advertising an event with musical entertainment.

[http://www.kirupa.com/web/xml/examples/MP3playlist.htm](http://www.kirupa.com/web/xml/examples/MP3playlist.htm)

Because all ads on our site must be booked through Open Ad Stream, the xml file across domains sandbox security issue requires that all the files (MP3s, xml, JPGs etc) have to be uploaded to OAS and fully pathed in the actionscript to where they reside OAS. Everything has been uploaded and pathed to OAS.

Because I made the player significantly smaller to fit into adspace I changed the font used from Digital Font Upright whereever I found a chance to do so to improve legibility. Everything is working fine in OAS except there is no song title in the title\_txt field once a song is selected which hurts intuitiveness. Because the event is Feb. 24 and this is a donation to charity I OKed the player ad running as is but would really like to solve this as I can.

Here is an example of the player ad running outside of OAS:

[http://www.kirupa.com/web/xml/examples/MP3playlist.htm](http://www.kirupa.com/web/xml/examples/MP3playlist.htm)

Scene 1  
border  
Frame 1  
version check  
Frame 1  
Actions for Frame 1  
if (parseInt($version.split(" “)[1].split(”,").join("")) \< 60400){  
this.attachMovie(“versionalert”,“alert”,1000,{\_x:120,\_y:140});  
}  
sound  
Frame 1  
Actions for Frame 1  
formatTime = function (millisecs){  
var secs = Math.floor(millisecs/1000);  
var mins = Math.floor(secs/60);  
secs %= 60;  
if (secs \< 10) secs = “0”+ secs;  
if (mins \< 10) mins = “0”+ mins;  
return mins +":"+ secs;  
}  
var snd = this.createEmptyMovieClip(“SoundController”, 1);  
snd.init = function(){  
snd.\_sound = new Sound(this);  
this.isPlaying = false;  
this.position = 0;  
loadingbar\_mc.\_xscale = 0;  
progressbar\_mc.\_xscale = 0;  
}  
snd.loadSound = function(url){  
this.\_sound.loadSound(url, true);  
stop\_btn.onRelease();  
this.updateTime();  
}  
snd.updateTime = function(){  
var time = formatTime(snd.position);  
if (time\_txt.text != time) time\_txt.text = time;  
}  
snd.\_sound.onSoundComplete = function(){  
stop\_btn.onRelease();  
}  
snd.onEnterFrame = function(){  
if (this.isPlaying) this.position = this.\_sound.position;  
this.loaded = this.\_sound.getBytesLoaded()/this.\_sound.getBytesTotal();  
loadingbar\_mc.\_xscale = scrubber\_mc.\_xscale \* this.loaded;  
progressbar\_mc.\_xscale = loadingbar\_mc.\_xscale \* this.position/this.\_sound.duration;  
this.updateTime();  
}  
play\_btn.onRelease = function(){  
if (!isPlaying){  
snd.\_sound.start(snd.position/1000);  
snd.isPlaying = true;  
}  
}  
pause\_btn.onRelease = function(){  
if (!snd.isPlaying) return (0);  
snd.position = snd.\_sound.position;  
snd.\_sound.stop();  
snd.isPlaying = false;  
}  
stop\_btn.onRelease = function(){  
snd.position = 0;  
snd.\_sound.stop();  
snd.isPlaying = false;  
}  
prev\_btn.onRelease = function(){  
if (snd.node){  
if (snd.node.previousSibling) SetSong(snd.node.previousSibling);  
else SetSong(snd.node.parentNode.lastChild)  
}  
}  
next\_btn.onRelease = function(){  
if (snd.node){  
if (snd.node.nextSibling) SetSong(snd.node.nextSibling);  
else SetSong(snd.node.parentNode.firstChild);  
}  
}  
scrubber\_mc.onPress = function(){  
if (!snd.loaded) return (0);  
var pos = this.\_xmouse/100;  
snd.position = Math.min(snd.\_sound.duration, pos \* snd.\_sound.duration/snd.loaded);  
if (snd.isPlaying) snd.\_sound.start(snd.position/1000);  
}  
SetSong = function(node){  
snd.node = node;  
snd.loadSound(node.attributes.src);  
title\_txt.text = node.attributes.title;  
}  
snd.init();  
xml  
Frame 1  
Actions for Frame 1  
XMLNode.prototype.moveBefore = function(beforeNode){  
if (this == beforeNode) return (0);  
beforeNode.parentNode.insertBefore( this.cloneNode(true), beforeNode);  
this.removeNode();  
}  
Clamp = function(min, n, max){  
if (n\<min) return min;  
if (n\>max) return max;  
return n;  
}  
var song\_spacing = 20;  
var over\_node;  
GenerateSongListing = function(playlist\_xml, target\_mc){  
target\_mc = target\_mc.createEmptyMovieClip(“list\_mc”,1);  
var songs = playlist\_xml.firstChild.childNodes;  
for (var i=0; i\<songs.length; i++){  
var song\_mc = target\_mc.attachMovie(“song”, “song”+i, i);  
song\_mc.\_y = i_song\_spacing;  
song\_mc.node = songs_;  
song\_mc.title\_txt.text = songs\*.attributes.title;  
song\_mc.moved = false;  
song\_mc.select\_btn.onPress = function(){  
this.\_parent.onMouseMove = function(){  
if (!this.moved){  
dragline\_mc.\_visible = true;  
dragline\_mc.\_y = playlist\_mc.\_y + this.\_y;  
highlight\_mc.\_visible = true;  
highlight\_mc.\_y = playlist\_mc.\_y + this.\_y;  
this.moved = true;  
}  
}  
}  
song\_mc.select\_btn.onDragOver = function(){  
over\_node = this.\_parent.node;  
dragline\_mc.\_y = playlist\_mc.\_y + this.\_parent.\_y;  
}  
song\_mc.onMouseUp = function(){  
if (this.onMouseMove){  
delete this.onMouseMove;  
dragline\_mc.\_visible = false;  
highlight\_mc.\_visible = false;  
if (this.moved){  
this.node.moveBefore(over\_node);  
GenerateSongListing(playlist\_xml, playlist\_mc);  
}  
}  
}  
song\_mc.select\_btn.onRelease = function(){  
if (!this.\_parent.moved){  
SetSong(this.\_parent.node);  
}  
}  
}  
}  
var playlist\_xml = new XML();  
playlist\_xml.ignoreWhite = true;  
playlist\_xml.onLoad = function(success){  
if (success){  
GenerateSongListing(this, playlist\_mc);  
}else trace(“Error loading XML file”); // no success? trace error (wont be seen on web)  
}  
playlist\_xml.load(“mp3\_playlist.xml”);  
dragline\_mc.\_visible = false;  
highlight\_mc.\_visible = false;  
show\_mc.\_visible = false;  
show\_btn.onRelease = function(){  
show\_mc.\_visible = true;  
var songs = playlist\_xml.firstChild.childNodes;  
show\_mc.display\_txt.text = playlist\_xml;  
show\_mc.display\_txt.text = show\_mc.display\_txt.text.split("\>").join("\>

");  
}  
show xml  
Frame 1  
show xml overlay, \<show\_mc\>  
skin border  
Frame 1  
surgeongeneral  
Frame 1  
Surgeon General’s Warning:  
The Capitol Steps will cause  
your sides to split.  
-C. Everett Koop , (Arial Narrow, 12 pts)  
Layer 18  
Frame 1  
playlist bar  
Frame 1  
drag position line, \<dragline\_mc\>  
highlight, \<highlight\_mc\>  
text  
Frame 1  
00:00, \<time\_txt\>, (Trebuchet MS, 28 pts)  
Song Title, \<title\_txt\>, (Arial, 14 pts)  
controls  
Frame 1  
play progress, \<progressbar\_mc\>  
stop, \<stop\_btn\>  
play, \<play\_btn\>  
pause, \<pause\_btn\>  
next, \<next\_btn\>  
prev, \<prev\_btn\>  
open xml, \<show\_btn\>  
bars  
Frame 1  
scrubber, \<scrubber\_mc\>  
loadingbar, \<loadingbar\_mc\>  
player skin  
Frame 1  
playlist, \<playlist\_mc\>  
logo  
Frame 1  
gr\_capstepsLogo  
playerbox  
Frame 1  
bluebox  
Frame 1  
capsteps  
Frame 1  
capsteps3  
btn  
Frame 1  
btn\_click  
Symbol Definition(s)  
show xml overlay  
Layer 1  
Frame 1  
show xml button  
Actions for show xml button  
on(release){  
\_visible = false;  
}  
(empty), \<display\_txt\>  
drag position line  
Layer 1  
Frame 1  
highlight  
Layer 1  
Frame 1  
play progress  
Layer 1  
Frame 1  
stop  
Layer 1  
Up  
Layer 2  
Up  
button backing  
play  
Layer 1  
Up  
Layer 2  
Up  
button backing  
pause  
Layer 1  
Up  
Layer 2  
Up  
button backing  
next  
Layer 1  
Up  
Layer 2  
Up  
button backing  
prev  
Layer 1  
Up  
Hit  
Layer 2  
Up  
button backing  
open xml  
Layer 1  
Up  
[show xml], (\_sans, 11 pts), (\_sans, 11 pts)  
Hit  
scrubber  
Layer 1  
Frame 1  
loadingbar  
Layer 1  
Frame 1  
playlist  
Layer 1  
Frame 1  
gr\_capstepsLogo  
action  
Frame 1  
Frame 322  
Actions for Frame 322  
stop();  
listen  
Frame 1  
Frame 270  
Listen to the Capital Steps  
, (Arial Narrow, 14 pts), (Arial Narrow, 14 pts), (Arial Narrow, 12 pts)  
copy2  
Frame 1  
Frame 193  
Click here for more info and  
to purchase tickets., (Arial Narrow, 12 pts)  
Frame 254  
Click here for more info and  
to purchase tickets., (Arial Narrow, 12 pts)  
Frame 255  
Tween 7  
Frame 269  
., (Arial Narrow, 12 pts)  
s, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
k, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
s, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
h, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
u, (Arial Narrow, 12 pts)  
p, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
d, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
f, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
m, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
f, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
h, (Arial Narrow, 12 pts)  
k, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
l, (Arial Narrow, 12 pts)  
C, (Arial Narrow, 12 pts)  
copy  
Frame 1  
Frame 97  
10th Anniversary Celebration  
Hyatt Regency Feb. 24, (Arial Narrow, 12 pts)  
Frame 182  
10th Anniversary Celebration  
Hyatt Regency Feb. 24, (Arial Narrow, 12 pts)  
Frame 183  
Tween 5  
Frame 192  
4, (Arial Narrow, 12 pts)  
2, (Arial Narrow, 12 pts)  
., (Arial Narrow, 12 pts)  
b, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
F, (Arial Narrow, 12 pts)  
y, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
g, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
R, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
y, (Arial Narrow, 12 pts)  
H, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
b, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
l, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
C, (Arial Narrow, 12 pts)  
y, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
s, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
v, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
A, (Arial Narrow, 12 pts)  
h, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
0, (Arial Narrow, 12 pts)  
1, (Arial Narrow, 12 pts)  
kids  
Frame 1  
Frame 15  
gr\_kvlogo  
Frame 27  
gr\_kvlogo  
Frame 72  
gr\_kvlogo  
Frame 85  
gr\_kvlogo  
Frame 269  
gr\_kvlogo  
Frame 280  
gr\_kvlogo  
cap  
Frame 1  
gr-caplogo  
Frame 20  
gr-caplogo  
Frame 72  
gr-caplogo  
Frame 85  
gr-caplogo  
Frame 269  
gr-caplogo  
Frame 280  
gr-caplogo  
btn\_click  
Layer 1  
Up  
show xml button  
Layer 1  
Up  
button backing  
Layer 1  
Frame 1  
button backing frame  
Frame 2  
button backing frame  
Frame 3  
button backing frame  
Frame 4  
button backing frame  
Tween 7  
Layer 1  
Frame 1  
., (Arial Narrow, 12 pts)  
s, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
k, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
s, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
h, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
u, (Arial Narrow, 12 pts)  
p, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
d, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
f, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
m, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
f, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
h, (Arial Narrow, 12 pts)  
k, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
l, (Arial Narrow, 12 pts)  
C, (Arial Narrow, 12 pts)  
Tween 5  
Layer 1  
Frame 1  
4, (Arial Narrow, 12 pts)  
2, (Arial Narrow, 12 pts)  
., (Arial Narrow, 12 pts)  
b, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
F, (Arial Narrow, 12 pts)  
y, (Arial Narrow, 12 pts)  
c, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
g, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
R, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
y, (Arial Narrow, 12 pts)  
H, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
o, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
b, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
l, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
C, (Arial Narrow, 12 pts)  
y, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
a, (Arial Narrow, 12 pts)  
s, (Arial Narrow, 12 pts)  
r, (Arial Narrow, 12 pts)  
e, (Arial Narrow, 12 pts)  
v, (Arial Narrow, 12 pts)  
i, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
n, (Arial Narrow, 12 pts)  
A, (Arial Narrow, 12 pts)  
h, (Arial Narrow, 12 pts)  
t, (Arial Narrow, 12 pts)  
0, (Arial Narrow, 12 pts)  
1, (Arial Narrow, 12 pts)  
gr\_kvlogo  
Layer 1  
Frame 1  
kvLogo  
gr-caplogo  
Layer 1  
Frame 1  
capsteps\_logo  
button backing frame  
Layer 1  
Frame 1
