Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Getting Title Of Song



hey every body... i was wonderdering how to get the title of a song... ive done this before but i cant seem to rember how

does any body think they can help me out?



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-15-2006, 04:03 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Scrolling Song Title With MP3 Player
I stumbled upon Lee's awesome Flash MP3 player tutorials as I'm finishing a website for a musician. Unfortunately, the artist wants the titles of the songs to scroll next to the player controls and Lee has yet to post the 3rd installment of his tutorial. Does anyone know where I could possible find instructions on how to do this? Any help is greatly appreciated!

? About Kirupa MP3 Player Song Title Not Showing In OAS
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

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


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:1 20,_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[i];
song_mc.title_txt.text = songs[i].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

Play Immediately Just By Clicking On The Song Title
Hey

Found this mp3 player in a tutorial http://www.kirupa.com/web/xml/examples/MP3playlist.htm and it works fine, but I'm trying to get to play the song when you click the title of the song and not like it is now by first clicking on the title and then clicking on the Play btn.

I've tried replacing stop_btn.onRelease with play_btn.onRelease in the snd.loadSound function, and it does start when you click the title, but when you select another song the scrubber and position does not reset.

Can anybody help?


Code:
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();
//play_btn.onRelease();
}
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;
scubber_mc._xscale = progressbar._mc._xscale;
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;

}

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();

Marquee Scroll Dynamic Text (song Title) From XML File In An MP3 Player
So I made some a nifty a MP3 player that grabs songs from an XML file. It displays the song name in the dynamic text field. Unfortunately, I only have very little display space and many of the track names are long. The solution: marquee scroll the text horizonally. The problem: I never marquee scrolled dynamic text and now I am lost. I am looking for some advice please.

Here is my main AS:

stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
if (success) {
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
trace(songname[i]+" "+songfile[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_root.sound_mc.sound_obj = new Sound();
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
MovieClip.prototype.songStarter = function(file, name) {
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.display_txt.text = name;
} else {
this._parent.display_txt.text = "loading...";
}
};
this.sound_obj.onSoundComplete = function() {
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
};
btn_play.onRelease = function() {
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_stop.onRelease = function() {
this._parent.sound_mc.sound_obj.stop();
};
btn_fw.onRelease = function() {
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_rev.onRelease = function() {
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
playlist.load("playlist.xml");


So yeah, this works fantastic. Now how do I marquee?


I tried dropping the following code in directly after this line... this._parent.display_txt.text = name; :

l = 25;
x = 0;
stringOf = function (c, l) {
var temp = "";
for (var x = 0; x<l; x++) {
temp += c;
}
return temp;
};
name = stringOf(" ", l)+name;
display = function () {
var temp = name.slice(x, l);
display_txt.text = temp;
x++;
l++;
if (x == name.length) {
x = 0;
l = 25;
}
};
setInterval(display, 200);
stop();

And while this did make the text scroll on the first song, it doesn't work so hot on the second song. It blips back-and-forth between the first and second song name. Advance to a third song and you've got an even bigger blipping mess. I kind of think that this code above isn't the way to go... that it isn't even worth reworking... that I should try something completely new. Anyone have any thoughts?

I Need A Button That Will Change The Song Depending On What Number Song Is Playing
alright i need a last button that will change the song that is playing.

if 5 is playing then change to 4 if 4 is playing than change to 3 the some for the next button.

if you can help than please post thank you

I Want To Play My Song..when I Click The Song Button.....
After playing an animation a song starts and i have a button where if i click, another song starts playing and previous one stops like that i want several songs to be played by clicking the desired button for that particular song.....someone gave me following action script but i think it works in flash MX only But i m Using Flash 5....and i want it in flash5..is there anyone who can help me....pleeeeeze..!

ss = new sound();
function loadnewsound (newone){
ss.loadsound(newone,false);
ss.start();
}
loadnewsound("track1.mp3);

//then on the button i have put
on (release){
loadnewsound("track2.mp3");


pleeze help!!!!

Play Song And Show Scrolling Song Name
Here's the scenario, I want to a have song be loading when the page loads. I want there to be a start and stop button and i want a change song button (the song that plays next could be random or in a certain order i dont care). I also want a movie clip im guessing that shows the song title (Mabey an empty symbol thing?) of each song. I would like the song title to scroll contiuously if thats at all possible but if not its no problem.
~Thanks

Getting To Next Song After Song Ends (flash 8)
hi!
Im using flash 8.

Is there any way i can get my script to go to next keyframe when the song on the current keyframe ends? (the song is locatet inside 1 mc, so i guess that the nextframe code is going to be with some kinda "_root" in front?)

Thanks, Andy

Trying To Import A Song For A Background Song
I need some help im making a website using flash 8 and im trying to import a song for a background song but flash wont let me its telling me that it cant do it

<title></title> - HTML To Flash
I've noticed that every time I have a .swf file open in the browser window, it has a really ugly title tag.


Quote:




(application_x-shockwave-flash Object)




Is there any code/not code that can make it say anything I want, and not "(application_x-shockwave-flash Object)?"

The Whole Song
Hello Everybody!
How can I play a complete song during a movie of 6 scenes?

Thanks!!!!!!!!!

Song
Sorry I'm still new at flash i want to make a music video. how do i get the song (mp3 file) in. And where ddo i go from there to play it and stuff. Thanks/

After Song Is Done...
What do I type in the action script if I the movie to go to a certain frame(or continue to the next one) once the song is done?(Is it even possible?)

Song
i have a 5 minute song i want in a game but i dont know how to put it in, i have a wav and MP3. plz tell me how! kthx!

Song Help
Im having trouble importing a song into flash to use on my website, it tells me it wasent important because there was trouble readin them. any help?

Lot's Mp3 Song
Ok it's simple I have 10 mp3 files and each one has his own play and stop .
the problem is when I play one song and then the other one they are both playing ( I solved this.)
And if I click more time same play btn they start playing on top of each other (also solved this).
If I put this code for one mp3 it doesn't want to play second time
code :
on (press){
if(playing!=true){
sound = new Sound();
sound.attachSound("galebovi");
sound.start(0,999);
playing=true;
}

}
what is the problem
tnx for help

Loading A Song Into An Swf .
Ok here is my question ..... i need to load a song into an swf . How would i go about doing this ??? Also when i load the song i need to load it into a varible so i can use volume and balance controll . How would i go about doing this ??? also would the song have to be a swf ??? thanks for your time .

Playing A Song
Hello,

What I'm trying to do: have a full length song play on my website.

I know how to import the mp3 file and insert it on the stage, my questions are,

How can I add a stop and play button for it? This is done with action script? I know a little bit about action script, so adding this play/stop button, is it easy to figure out?

Also is there a better sound file I should use to import a song into flash? Are MP3 ideal? or is there another type of file I should use to make it load faster?

Any suggestions that would help are appreciated.

Thanks,
C

Fade 1 Song Out And Fade In New Song?
Can Anyone direct me as how to do this?

http://www.kennybellew.com

goes over fading out and in...but not for 2 songs.

I could use his code and write a function passing the song I want to fade out and then re-run a function that passes the second song to fade in...not sure how to do this with javascript in Flash.

Thanks,
Andrea

Song Button
i want to make a song button for a website, but the song filesize is 2.7mb, if i streamed the audio would that make less loading time, and how do i stream audio

Song Through Out Movie
Hey, to anyone who reads this and helps me out.
So I have a movie (with various scenes) and I have to make this song play out through the whole movie... how would I do that? make another scene and call it out throught the other scenes? Thanks,

Odd - Loop Song
I have a song looped within a movieclip (MC_1) that is enabled by an actionscript:

LoopSong = new Sound();
LoopSong.attachSound("Twilight Piano");
LoopSong.start(0, 99999); //0 offset with 99999 loops

When tested it works fine, also when I export the file as a MC_1.swf and double click it, everything works.

The odd thing is when I run the index file (Main.swf) that has a button link to call MC_1.swf, the movie plays but the loop song will not start. I can't figure out why.. I made sure all variables were unique, anyone have any idea?

thanks

Play A Song Again
I'm creating sound in the background of something and I want it to be controllable. I can stop the sound with the stop button, but I can't get it to play again with the play button. I gave the sound an instance name to try using the script

on (release) {
clarity.start()
}


that doesn't work though. What can I do to play the sound? The sound is in one of my layers. thanks

maria-

Need Song Put To Video.
I have a song I need put to a flash video. The video would need to look something like the videos that play on the windows media player with our website name and one or two skulls popping up from time to time. Let me know how much this would cost and please show me some work that you have done like this.

Song Titles
Hey,

I have a simple music player that plays external .mp3 files.

I am trying to display the songs names for each song. I have 5 different songs, I want to make it so when the user clicks the "next song" button, I want the name of the 2nd song to appear, and if the user clicks the "next song" button again, I would like the title for the 3rd song to appear and so on.

I am not really sure on how to accomplish this. Maybe with variable names?

Thanks,
Baljinder

Background Song
I've made a website in flash with 5 scenes and I would like to know if I can make a song to keep playing even if I walk between the scenes?? thx in advance

I Have A Song That I Want To Use , But Its Volume Is Very Low , How Can I Get It....
i have a song that i want to use for my flash site , but the volume of the song is a little low , is there a way i can make the volume higher? the original song is low volume , so i belive i need a way a way to make the volume higher using a different program . so any u guyz know any programs that can do that or something? thanX

Song Change
hey i was just wondering if someone could tell me how to change the songs on this player:

click here

Song Problems
When I try to import this one song, it does not work. a pop up comes up and it says "having problems reading the file" something like that. but when i try a different song, it works but not this one. the song is the theme song from SAW.

End Tween At End Of Song
hey does any one know if there is a way to end a tween at then end of a song loaded from then internet?

if there is a way to load the length of the song in frames as a varible then im sure i could figure out a way to end a tween on it...

thanks a bunch for any help
-yeps

Random Song
I want a little flash doc to load a random mp3 from a website and play it. so, i need to get a random number, and use it to select a url...

I = random number
if I = 1 then URL = "song1.mp3"
if I = 2 then URL = "song2.mp3"
if I = 3 then URL = "song3.mp3"
if I = 4 then URL = "song4.mp3"
*play URL*

but i dont know how to code this.

Song In Movie
I am putting a song loop in my movie. As the song plays I want it to get faster and faster. Is there a way to do this with a short loop?

Song Position
I'm making a small simple music player. But I have a problem I can't figure out. When some one changes the position of the progress how do you change the position of the song. I've always seen the simple play and stop for mp3. But this seems more complex than that. Does anyone know how to do that?

Thanks!

The (really) Old Song Of Data To .txt
hmm, I have tha t realy simple AS2 code :


Code:
on (press) {
savbuff = new LoadVars();
lvfake = new LoadVars();
sav = _root.currfram;
savbuff.sav = sav;
savbuff.sendAndLoad("Save.txt", lvfake, "POST");
lvfake.onLoad = function(success:Boolean) {
if (success) {
trace("year! ");
}
};
}
...I want to save a number like 14 (stored in _root.currfram) in my save.txt (&sav=14 ), but I dont know how!
I already have done such many times with php, writing in db and others, but I dont want a server application, my swf runs on a single PC and I just want to store that damn f**g integer!!
anyone knows how to direktly write to .txt? without any php or other
(loading things works perfektly!...)
please any help!! thx

Song Not In Sync
This is getting frustrating

I have Flash CS3 (I don't know if that's similar to 9), and I'm currently trying to make an animation, which is supposed to be in sync with the song I put in. What I do is put the song on a layer and then do my animation, and then preview it right on the program; and it's fine this way. However, when I Test Movie (CTRL+Enter) and watch it on there, the song goes too fast and the animation can't keep up. What is wrong here?

My export settings for the audio stream and event are: MP3, 160 kbps, Best

I'd really appreciate any input. Thanks.

Rights Of A Song
Hello,
I would like to know if you have to pay rights if you use a full song (not a loop) in a website.
Thanks in advance.

Syncing A Song
I have a .txt file with words in it and times.

example:

38.509105I
38.783629can
39.000587do
39.486482that
39.691871now

What I would like to do is print out all of the lyrics in a dynamic box and then highlight each word when an mp3 reaches the time to the left.


any help is greatly appreciated

Thanks

Song Won't Loop?
I have a song attached externally and it plays well but it doesn't loop?
I know there's a lag or pause with this type of song loading but it doesn't play at all. If anyone can help me or point me to an article let me know.

bgsong = new Sound();
bgsong.loadSound("song.mp3", true);
bgsong.start(0.05,20);

Thanks.

Loading Song, NaN ?
Hey, I have an mp3 on my little site, but when It is supposed to load, instead of the percentage number, its just says NaN, anyone know why?
Here my code:

Code:
AudioXml = new XML();
AudioXml.ignoreWhite = true;
AudioXml.onLoad = LoadXmlFile;
AudioXml.load(playListPath);
function LoadXmlFile(success) {
if (success) {
aPath = new Array();
asongTitle = new Array();
aAudio = new Array();
aAudio = this.firstChild.childNodes;
AudioTotal = aAudio.length;
for (i=0; i<AudioTotal; i++) {
if (aAudio[i].nodeName == "AudioProps") {
aPath.push(aAudio[i].attributes.path);
asongTitle.push(aAudio[i].attributes.songTitle);
}
}
AudioPath = aPath[0];
tAuthor = asongTitle[0];
AudioActual = 1;
tCount = AudioActual+" Of "+AudioTotal;
tText = "Xml Loaded";
} else {
tText = "Xml not loaded";
}
}
Ff.onPress = function() {
if (AudioActual<AudioTotal) {
AudioActual += 1;
AudioPath = aPath[AudioActual-1];
tAuthor = asongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
Rw.onPress = function() {
if (AudioActual>1) {
AudioActual -= 1;
AudioPath = aPath[AudioActual-1];
tAuthor = aSongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
PlayBtn.onPress = function() {
if (FlagPausa == true) {
MySound.start(SoundPausePos, 0);
FlagPausa = false;
SoundPausePos = undefined;
} else {
MySound = new Sound();
volume = 100;
MySound.setVolume(volume);
MySound.loadSound(AudioPath, StreamFlag);
FlagPausa = false;
_parent.onEnterFrame = function() {
TB = MySound.getBytesTotal();
BL = MySound.getBytesLoaded();
if (BL != TB) {
TheText2.text = Math.round((BL/TB)*100)+"% Loaded";
} else {
TheText2.text = "100% Loaded";
delete _parent.onEnterFrame;
MySound.start();
}
};
}
};
StopBtn.onPress = function() {
MySound.stop();
Mystatus = "Press Play";
};
PauseBtn.onPress = function() {
SoundPausePos = MySound.position/1000;
MySound.stop();
FlagPausa = true;
};
volUp.onPress = function() {
if (volume == 100) {
volume = 100;
} else {
volume += 10;
MySound.setVolume(volume);
}
};
volDown.onPress = function() {
if (volume == 0) {
volume = 0;
} else {
volume -= 10;
MySound.setVolume(volume);
}
};
Thanks,
fatnslow

Help With Xml Song Loading?
Hi!
I have a question,
I need to know how to make this file, load form a url instead of a path.
i know basic script. and virtually no xml. im assuming you change the word path to url in the xml... and then i dotn know how to fix the flash file. please help!

http://downloads.flashkit.com/movies...is_Jo-8416.zip

i want to do something like it for my bands site, but no clue how to work it.

thanks!

Song Stream
Ok I have this code for a song that I have streaming on keyframe 1... I have a second song streaming on keyframe 2... I was attempting with the following code to goto keyframe 2 and start playing the second song after the first one was completed with the following code.... but now its now working at all and im getting an output of "};"

the code:
stopAllSounds();
mySound = new Sound();
mySound.loadSound("Blazing.mp3", true);
mySound.onSoundComplete = function("Blazing.mp3", true) {
};
gotoAndPlay(2);

anyone have an idea?

thanks

Song Timer
Hey guys, I have no idea where to start with this.

I'm makking a simple flash player which loads movies as the songs.

The song file is simply a preloader then in the next scene one frame which plays the song.

I would like to know how I can have a display which shows the song time.

Any help would be great.

Thanks in advance

Help With Mp3 Player, Go To The Next Song
Hey gang.

I have this little radio I've made for a singers' site. It auto starts when the page is loaded, but just the first song. The artist wants the radio to go through the entire array of songs like a CD when the user is at the site. However, the radio also has a comboBox, so that users can select what song they want to hear and play it. That part all works fine EXCEPT making the autoplay part go to the next song after the first ends. This is the very simple AS I put on the movie to make the first song play when the movie loads. So how do I get it to go to the next item in the comboBox and then the next and then the next?

Any help would be greatly appreciated.

Thanks in advance!
.pete.


Code:
stopAllSounds();
var song = new Sound();
song.loadSound(cbSongselect.selectedItem.data, true);
nowplaying.text = cbSongselect.selectedItem.label;
song.onSoundComplete = function() {
stopAllSounds();
nowplaying.text = defaulttext;
}

Song Counter
does anyone know how to adjust kennybellews counter to track seconds and minutes when tracking a song?

this.onEnterFrame = function () {
myMusicPositionText=_root.track1.position/1000.;

};

this tracks milliseconds and seconds.............

thanks, teddy

Loading Song, NaN ?
Hey, I have an mp3 on my little site, but when It is supposed to load, instead of the percentage number, its just says NaN, anyone know why?
Here my code:

Code:
AudioXml = new XML();
AudioXml.ignoreWhite = true;
AudioXml.onLoad = LoadXmlFile;
AudioXml.load(playListPath);
function LoadXmlFile(success) {
if (success) {
aPath = new Array();
asongTitle = new Array();
aAudio = new Array();
aAudio = this.firstChild.childNodes;
AudioTotal = aAudio.length;
for (i=0; i<AudioTotal; i++) {
if (aAudio[i].nodeName == "AudioProps") {
aPath.push(aAudio[i].attributes.path);
asongTitle.push(aAudio[i].attributes.songTitle);
}
}
AudioPath = aPath[0];
tAuthor = asongTitle[0];
AudioActual = 1;
tCount = AudioActual+" Of "+AudioTotal;
tText = "Xml Loaded";
} else {
tText = "Xml not loaded";
}
}
Ff.onPress = function() {
if (AudioActual<AudioTotal) {
AudioActual += 1;
AudioPath = aPath[AudioActual-1];
tAuthor = asongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
Rw.onPress = function() {
if (AudioActual>1) {
AudioActual -= 1;
AudioPath = aPath[AudioActual-1];
tAuthor = aSongTitle[AudioActual-1];
MySound.stop();
Mystatus = "Press Play";
}
};
PlayBtn.onPress = function() {
if (FlagPausa == true) {
MySound.start(SoundPausePos, 0);
FlagPausa = false;
SoundPausePos = undefined;
} else {
MySound = new Sound();
volume = 100;
MySound.setVolume(volume);
MySound.loadSound(AudioPath, StreamFlag);
FlagPausa = false;
_parent.onEnterFrame = function() {
TB = MySound.getBytesTotal();
BL = MySound.getBytesLoaded();
if (BL != TB) {
TheText2.text = Math.round((BL/TB)*100)+"% Loaded";
} else {
TheText2.text = "100% Loaded";
delete _parent.onEnterFrame;
MySound.start();
}
};
}
};
StopBtn.onPress = function() {
MySound.stop();
Mystatus = "Press Play";
};
PauseBtn.onPress = function() {
SoundPausePos = MySound.position/1000;
MySound.stop();
FlagPausa = true;
};
volUp.onPress = function() {
if (volume == 100) {
volume = 100;
} else {
volume += 10;
MySound.setVolume(volume);
}
};
volDown.onPress = function() {
if (volume == 0) {
volume = 0;
} else {
volume -= 10;
MySound.setVolume(volume);
}
};
Thanks,
fatnslow

Help With Xml Song Loading?
Hi!
I have a question,
I need to know how to make this file, load form a url instead of a path.
i know basic script. and virtually no xml. im assuming you change the word path to url in the xml... and then i dotn know how to fix the flash file. please help!

http://downloads.flashkit.com/movies...is_Jo-8416.zip

i want to do something like it for my bands site, but no clue how to work it.

thanks!

Animating A Mp3 Song
Hello,
I'd like to use flash to animate a 3 minute mp3.
After importing it successfully I cannot drag it onto a frame without the program locking up.
Is there a file size limitation to what you can place in flash?

I'd also like to synchronize the animation to specific parts of the song.


thanks,
pearldive

[as1] Detect Song End
I am building a mp3 player. i want my mp3 player to go to the next song when my first song ends automatically. How can i detect the end of a song and send it to the next song?

Thanks for any help!

Getting Song Permission
hey guys, do you know where i could get permission to use a song a u2 song on my site

or does someone know the rules for using copyright songs

Copyright © 2005-08 www.BigResource.com, All rights reserved