|
-
KoolMoves Moderator
Expanded Skin in progress (feedback?)
Here's the new skin I've been working on.
http://bretlanius.com/flash/lab/example.html
It has a single visualization at the moment.
It has pull out ID3 tag panel
It has Fullscreen toggle.
I welcome feedback in general and especially in regards to the added features.
Thanks to Wilburt again for making such a great skinable player. All the features you see on this skin are contained in the skin.
The only manual thing to do is adding support for the fullscreen into the HTML tags.
Last edited by blanius; 09-24-2007 at 03:57 PM.
-
Ubi bene, ibi patria
Well, what do you want me to say Bret? I like the skin and I like that it has a visualization. Having several visualizations would even be nicer , but it's a good start. The full screen option was a big (literally!) surprise and may come in handy. I never gave that much thought until now.
It's a good looking player and it will be a great extension to the existing KM media players.
Everybody thinks of changing humanity,
Nobody thinks of changing himself.
-
-
KoolMoves Moderator
Nightcap, still working out some other visualizations but the hard part is making the option of several within the skin. That requires me to make all objects via script. But I'm working on it.
Haven't decided if the id3 panel should pull out like it does now which compromises the fullscreen. I suppose I might try to make it work differently in Fullscreen as opposed to not.... I don't know can't decide.
-
 Originally Posted by blanius
Haven't decided if the id3 panel should pull out like it does now which compromises the fullscreen.
The next flash player update (Flash Player 9 Update 3) that is already available as a public beta ( http://labs.adobe.com/downloads/flashplayer9.html ) supports a stage property to set the rectangle that will be scaled to full screen. I suggest using that.
Code:
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, Stage.width, Stage.height);
Stage.displayState = 'fullScreen';
-
KoolMoves Moderator
-
Ubi bene, ibi patria
 Originally Posted by blanius
Nightcap, still working out some other visualizations but the hard part is making the option of several within the skin. That requires me to make all objects via script. But I'm working on it.
Haven't decided if the id3 panel should pull out like it does now which compromises the fullscreen. I suppose I might try to make it work differently in Fullscreen as opposed to not.... I don't know  can't decide.
My remark about the visualizations was in jest, but having a few available makes the player all the more attractive.
Possibly the ID panel could come down from the top of the player when in fullscreen mode? It may not be what you had in mind, still it's better than having no ID panel.
Everybody thinks of changing humanity,
Nobody thinks of changing himself.
-
KoolMoves Moderator
The current test I've got going is when in FS the id3 panel is an overlay and in normal it's a pullout and using the Beta player and the new code, in FS it's just the player window. The challenge is that the code got complicated quickly just to move the id3 panel in two different ways. I can handle it but it would be better if I could programaticly change the state of the button. Any way it's coming along.
-
Ubi bene, ibi patria
I'm sure it will turn out great despite the challenges. Keep us informed.
Everybody thinks of changing humanity,
Nobody thinks of changing himself.
-
Bret,
Inspired by the work you did I also tried to create a visualization.
http://www.geboortegrond.nl/soundscape/
The main concern to me is if the cpu load isn't getting to high. How do you keep it low ?
-
KoolMoves Moderator
so far I've keep them simple. First one just uses lineTo can clear() and the other one I have working just is a variation with curveTo. I'm working on the next one and playing with the idea of fiddling with a color matrix
-
 Originally Posted by blanius
fiddling with a color matrix
That might work out pretty nice. A color matrix doesn't take much time to render and has a lot of possibilities.
-
That web bloke
Can you let me know how are you accessing which variables to create the visualisation.
Last edited by Stoke Laurie; 09-26-2007 at 12:05 PM.
-
KoolMoves Moderator
Code:
onFD=function(a){//a is array of 9 to 12 elements, I think is the range from 0-10
for (x=0;x<=a.length;x++){
//here we can use a[x]
}
}
-
Actually the range for each array item is 0 - 15 .
-
That web bloke
Thanks for your replies guys, but still in the dark, perhaps if Brett were to submit his first example to Koolexchange, we could have a greater understanding and then get on with the fun bit of creating the graphics.
-
KoolMoves Moderator
On my laptop at the moment. On shoots nearly daily till late next week so not getting much done, but if I get a free moment I'll put the test player up that I demoed (http://www.bretlanius.com/flash/lab/mediaVisuals.html) right this moment it's 12:45 am and just got in from a 13+ hour shoot on the stage for a fence company DVD
-
Ubi bene, ibi patria
Get some sleep DVD dude.
Everybody thinks of changing humanity,
Nobody thinks of changing himself.
-
KoolMoves Moderator
Here's the code for the one visualization
Code:
mediaplayer1.onFD(a){
start=30
if (a.length){
mc4.clear()
mc4.moveTo(start,0)
c=randRange(0x000000,0xffffff)
for (x=1;x<=a.length+1;x++){
mc4.lineStyle(2, c, 100, false, "none", "square", "miter", 8)
mc4.lineTo(start*x-1,-a[x-1]*25)
}
}
}//end onFd
Mc4 is just empty holder that I draw on.
Also it uses the function
Code:
function randRange(min,max){
var randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}
The new code is a little different as I'm building inside of the skin. Still working this out.
-
KoolMoves Moderator
I've worked pretty hard on this and hesitated to share it so be nice y'all
Here's what it looks like so far.
http://bretlanius.com/flash/lab/example.html
Requires Beta 9 flash player to get all the features.
Here's the LOAD.AS so far for the expanded skin. You won't be able to use this directly without my graphics that match the code but should start you in the right direction
Code:
MovieClip.prototype.easeTo=function(x,y,speed){
this.onEnterFrame= function(){
this._x += (x-this._x)/speed;
this._y += (y-this._y)/speed;
}
}//end easeTo Function
function randRange(min,max){
var randomNum = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}//end randRange function
pl_item_up = new flash.display.BitmapData(260,20,true,0);
pl_item_down = pl_item_up.clone();
pl_item_over = pl_item_up.clone();
pl_item_up.fillRect(new flash.geom.Rectangle(0,1,260,18),0xd0808080);
pl_item_down.fillRect(new flash.geom.Rectangle(0,1,260,18),0xd0c07000);
pl_item_over.fillRect(new flash.geom.Rectangle(0,1,260,18),0xd0a07840);
vslider = new flash.display.BitmapData(4,180,false,0x808080);
drag = new flash.display.BitmapData(8,8,false,0xc0c0c0);
pl_bg = "playlist"
pl_bg._x-=20
//create id3panel
id3bg = flash.display.BitmapData.loadBitmap(prefix + 'id3panel');
this.createEmptyMovieClip("id3panel", this.getNextHighestDepth());
id3panel.attachBitmap(id3bg, 2, "auto", true);
id3panel.createTextField('info',this.getNextHighestDepth(),15,15,250,200)
id3panel.info.multiline = true;
id3panel.info.wordWrap = true;
id3panel.info.selectable=false;
id3panel.info.html=true;
id3panel.info.mouseWheelEnabled=true;
id3panel.swapDepths(-10)
id3panel.out=false
id3panel._visible=true
//Create Visualizer
//visbg = flash.display.BitmapData.loadBitmap(prefix + 'visualsBG');
this.createEmptyMovieClip("vmc", this.getNextHighestDepth());
//vmc.attachBitmap(visbg, 2, "auto", true);
vmc._x=5;
vmc._y=5;
vmc._visible=false;
/*
* Need to decide how to preload the visualizers and build the child clip for this so that the user
* can selecet from a couple of visuals
*/
setUnderlayImage(0,0,'underlay');
setDisplay(10,10,309,230);
setScaleMode(0,false);//0 (scale to fit), 1 (scale and crop) or 2 (crop).
setInfoScroll(1,_sans,14,0xb2480b,false,3);
setTimelineSlider(80,250,'',1,2,1,'sliderFill',0,6,170,'pSlide','pSlide','pSlide');
setVolumeSlider ( 260, 250, 'volFill', 0, 0,-1, 'volfill', 2, 5, -40, 'volSlide', 'volslide', 'volSlideOver' )
setTimer(250,280,'_sans',11,0xf0f0f0,true,true);
setPauseButton(35,255,'pause','','pauseOver');
setPlayButton(35,255,'play','','playOver');
setPrevButton(5,255,'prev','prev','prevOver');
setNextButton(50,255,'next','next','nextOver');
setPlButton(300,270,'pls','plsO','plsO',true);
setUserButton ( 1,290,220, 'id3', 'id3D', 'id3',true)
setUserButton ( 2,275,245, 'fullScreen', 'fullScreenD', 'fullScreen',true)//fullscreen
setUserButton ( 3,300,250, 'vis', 'visD', 'vis',true)//Visualizations
setListDisplay(20,20,pl_bg,null,null,null,8,10,180,pl_item_up,pl_item_down,pl_item_over,'_sans',11,0xffffff,true,'left',280,15,vslider,2,0,-180,drag,null,null,true);
pl_underlay.swapDepths(7);
plSelClose=true;
setListVisibility(false);
setExternalPlaylist ( 'playlist.txt', 0 )
this.createTextField('txt1',getNextHighestDepth(),10,280,200,40);
txt1.multiline=false;
txt1.selectable=false;
onPlay=function(nr,fname){
txt1.text=fname.slice(fname.lastIndexOf('/')+1,fname.lastIndexOf('.'))
vmc.clear()
ext=fname.substr(fname.lastIndexOf('.')+1)
fname=fname.slice(0,fname.lastIndexOf('.'))
if (ext!='mp3' && ext!='fd'){
id3panel.info.htmlText="<b></b>id3 Not Available for\n"+ext+" Files</b>"
}
}
onUserButton=function(nr,down){
if(nr==1){//id3
if (Stage.displayState=="fullScreen"){
id3panel._visible=!id3panel._visible;
}else{
id3panel.out=!id3panel.out
if (id3panel.out){
id3panel.easeTo(325,0,5)
}else{
id3panel.easeTo(0,0,5)
}
}
}
if(nr==3){//vis
vmc._visible=!vmc._visible
}
if (nr==2){//Fullscreen toggle
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 360, Stage.height);
if (down==true){
Stage.displayState="fullScreen"
id3panel.swapDepths(99)
if(id3panel.out){
id3panel.out=false;
id3panel._visible=false;
id3panel._x=0;
}
}else{
id3panel.swapDepths(-10)
id3panel._visible=true
id3panel.out=true;
id3panel._x=0;
Stage.displayState="normal"
}
}
}
onID3=function(){//id3 2 tags only
if(id3.TIT2){
txt1.text=id3.TIT2;
}
this.id3panel.info.htmlText="<b>Title: </b>"+id3.TIT2+" <b>Track: </b>"+id3.TRCK+" <b>Length: </b>"+id3.TIME+"\n";
this.id3panel.info.htmlText+="<b>Artist: </b>"+id3.TPE1+"\n";
this.id3panel.info.htmlText+="<b>Comment: </b>"+id3.COMM+"\n";
this.id3panel.info.htmlText+="<b>Genre: </b>"+id3.TCON+"\n";
}
onFD=function(a){
/*Lines
c=randRange(0x000000,0xffffff)
if (a.length){
vmc.clear()
vmc.moveTo(40,200)
for (x=1;x<=a.length;x++){
start=40
vmc.lineStyle(2, c, 100, false, "none", "round", "miter", 8)
vmc.lineTo(start+(x*20),200+(-a[x-1]*15))
}//end for
}//end if
*/
//curves
if (a.length){
vmc.clear()
for (x=1;x<=a.length+1;x++){
start=40
c=randRange(0x000000,0xffffff)
vmc.moveTo(40,10)
vmc.lineStyle(2,c,100,false,"none","round","miter",8)
vmc.curveTo((x*30),a[x]*40,280,10)
}//end for
}//endif
}
Last edited by blanius; 09-29-2007 at 05:53 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|