Wilburt this one is for you.
I'm trying to make use of the FD data and to test the function I tried this in the load.as file
onFD(fd){
_root.txt1.text=fd.length;
}
but I get undefinded, the fd is displayed in the normal fd display.
Printable View
Wilburt this one is for you.
I'm trying to make use of the FD data and to test the function I tried this in the load.as file
onFD(fd){
_root.txt1.text=fd.length;
}
but I get undefinded, the fd is displayed in the normal fd display.
While we're at it how about the onID3 function?
The event fires but I cannot figure out how to access the id3 tag. I want to expand the a mediaplayer skin with some custom buttons and display extended id3 tags in a window and also make some movements based on fd data.
if I do this in timeline
I get _level0 which is NOT what I expect Shouldn't that be the mediaplayer and if so how do I reference the id3 tag, shouldn't it be mediaplayer1.?song?.id3 where ?song? is the internal name of the sound object?Code:mediaplayer1.onID3(){
_root.txt1.text=this
}
Try thisCode:mediaplayer1.onID3 = function(){
_root.txt1.text = this.id3.artist;
}
mediaplayer1.onFD = function(a){
_root.txt2.text = a.length;
}
duh thanks
I remember that I was not able to use the in command to loop through the properties of an object, we discussed this some time ago in relation to id3 tags. There must be a work around for this...
Here's a test using onFD, the speaker and the display are driven by onFd, also extended ID3 information using onID3
http://www.bretlanius.com/flash/lab/playertest2.html
Nice work Bret :)
I don't know if you already figured out how to loop through all id3 properties.
Here's an example in case you didn't.Code:mediaplayer1.onID3 = function(){
var o = this.id3;
var p;
for (p in o) {
_root.txt1.text += 'property:' + p + ' value:'+o[p]+'\n';
}
}
Can you explain this a little more in general? I remember you was trying to do this a few months ago.Quote:
Originally Posted by blanius
Thanks Wilburt, that is what I was talking about. I couldn't get it to work but will try again with your code.
Tmoore Mediaplayer object has there functions already. onFd and onID3 I'm just playing around with using them.
The Display is just a MC with 9 clips in it with a single shape on each.Code:mediaplayer1.setExternalPlaylist("playlist.txt")
mediaplayer1.onPlay=function(){
_root.txt2.text="";
mc3.mc1._xscale=mc3.mc1._yscale=0
mc3.mc2._xscale=mc3.mc2._yscale=0
mc3.mc3._xscale=mc3.mc3._yscale=0
mc3.mc4._xscale=mc3.mc4._yscale=0
mc3.mc5._xscale=mc3.mc5._yscale=0
mc3.mc6._xscale=mc3.mc6._yscale=0
mc3.mc7._xscale=mc3.mc7._yscale=0
mc3.mc8._xscale=mc3.mc8._yscale=0
mc3.mc9._xscale=mc3.mc9._yscale=0
}
mediaplayer1.onFD = function(a){
_root.txt1.text = a[5];
speaker.grill._xscale=95+a[5]
speaker.grill._yscale=95+a[5]
mc3.mc1._xscale=mc3.mc1._yscale=25*a[1]
mc3.mc2._xscale=mc3.mc2._yscale=25*a[2]
mc3.mc3._xscale=mc3.mc3._yscale=25*a[3]
mc3.mc4._xscale=mc3.mc4._yscale=25*a[4]
mc3.mc5._xscale=mc3.mc5._yscale=25*a[5]
mc3.mc6._xscale=mc3.mc6._yscale=25*a[6]
mc3.mc7._xscale=mc3.mc7._yscale=25*a[7]
mc3.mc8._xscale=mc3.mc8._yscale=25*a[8]
mc3.mc9._xscale=mc3.mc9._yscale=25*a[9]
}
mediaplayer1.onID3 = function(){
var o = this.id3;
var p;
for (p in o) {
_root.txt2.text +=p + ':'+o[p]+'\n';
}
}
The speaker is a two layer clip and I scale the background one a little based on the value of a FD
This is how swf-tools worked. I remember this. If the volume was tied into the FD's, then they could respond to the music output. But thats getting too "tweeeked" :)
If a song has id3 v1 and v2 tags you get both. Any ideas on not seeing the duplicated tags?
Besides filtering when you loop through all properties I see no option.Quote:
Originally Posted by blanius
The id3 object is the same as from the sound class and it doesn't have a function to only get the v1 or v2 tags.