INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MiniSkin redirect  (Read 1596 times)

Frank

  • Guest
MiniSkin redirect
« on: May 29, 2002, 09:15:53 am »

I just posted this on the TalkBack message board, but was told it would be better answered here.

Would there be a way to rig the miniskins to display a window for the media library?  There should be a way to do this.

Also is there any way someone could explain to me the the "state" file in each miniskin directory.

Can I really only make a skin with 16 colors. All other bmp files with more than 16 colors were not recognized.

Also, is there a way to make the miniskin come back to the place you put it last after you close media jukebox and come back to the miniskin, instead of it always coming back to the middle of the screen.

One more question, what are all the codes for the FX's (like Blend and stuff)?
Logged

Frank

  • Guest
RE:MiniSkin redirect
« Reply #1 on: May 29, 2002, 05:35:08 pm »

I don't know what happened with the BMPs but i'm not getting that problem with only allowing 16 color bmps anymore.
Logged

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
RE:MiniSkin redirect
« Reply #2 on: May 29, 2002, 07:59:00 pm »

Frank,

Sorry about not replying earlier. We have been very busy trying to get 8.0 out.

> I just posted this on the TalkBack message board, but was told it would be better answered here.
That's the spot.

> Would there be a way to rig the miniskins to display a window for the media library? There should be a way to do this.
There is no way to display media library inside a skin. Maybe in next version.

> Also is there any way someone could explain to me the the "state" file in each miniskin directory.
The state file stores the information about all windows and items inside the skin, it's saved onexit and loaded when skin is loaded. This way skin remembers what windows were visible and which buttons had pressed state. it's created by the Metamorphis engine and should not be modified.

> Can I really only make a skin with 16 colors. All other bmp files with more than 16 colors were not recognized.
You can make skin using bitmaps with any number of colors, you can also use GIF and JPEG files.

> Also, is there a way to make the miniskin come back to the place you put it last after you close media jukebox and come back to the miniskin, instead of it always coming back to the middle of the screen.
Location of the skin during start is maintained by state.xml file created in the skin directory. Take a look at the Rotor skin main.js file inside OnInitialize you will find function call Metamorphis.LoadSkinState() that tells the skin to load previously saved state ( using function Metamorphis.SaveSkinState() ) from the state.xml file.

> One more question, what are all the codes for the FX's (like Blend and stuff)?
The codes are Blend, HFill, VFill, Scroll, OpenScroll, OpenFill and Rotate. You can find this and more information on our Developers' Zone http://www.musicex.com/mediajukebox/developers.html
Take a look at Skins SDK.

Best Regards,
Nikolay Sokratov
CTO, JRiver, Inc.
Logged

Frank

  • Guest
RE:MiniSkin redirect
« Reply #3 on: May 30, 2002, 10:34:34 pm »

No need for appologies, I'd much rather you spend your time on version 8, and then a long relaxing vacation anyway.  Version 8 looks great, on to the advertising, right?  Thanks for the answer too by the way.
Logged

Frank

  • Guest
RE:MiniSkin redirect
« Reply #4 on: May 30, 2002, 10:59:08 pm »

Would it be possible for you to type out exactly what I need for the skin to remember where it was and in which file?  

Here is the text from the Rotar main.js file if that is of any help.  Maybe you could just delete what isn't necessary.  Oh by the way in my skin all it is is a main window.  That should make it a little more simpler.

var stateNormal = 1;
var statePressed = 2;
var stateDisabled = 3;
var stateHidden = 4;

var typeButton = 0;
var typePlaceholder = 1;
var typeSlider = 2;
var typeInfoDisplay = 3;
var typePicture = 4;

var stateStopped = 0;
var statePaused = 1;
var statePlaying = 2;
var stateWaiting = 3;

var StatusTimer = 0;

function OnInitialize()
{
if(Metamorphis.LoadSkinState() == false)
{
 var x = Player.Left;
 var y = Player.Top;
 
 TextWindow.SetWindowPos(x |PLS| 20, y |PLS|190);
 Visualization.SetWindowPos(x - 175, y |PLS|100);
 EQ.SetWindowPos(x - 101, y -140);
 
 Visualization.ShowWindow(true);
 EQ.ShowWindow(true);
 TextWindow.ShowWindow(true);
 
 var ButtonEQ = Player.GetSkinItem(typeButton, "ToggleEqualizer");
 ButtonEQ.State = statePressed;
 ButtonEQ.Tooltip = "Hide Equalizer";
 
 var ButtonVis= Player.GetSkinItem(typeButton, "ToggleVisualization");
 ButtonVis.State = statePressed;
 ButtonVis.Tooltip = "Hide Visualization";
 
 var ButtonPl = Player.GetSkinItem(typeButton, "TogglePlaylist");
 ButtonPl.State = statePressed;
 ButtonPl.Tooltip = "Hide Playlist";
 
 Player.GetSkinItem(typeInfoDisplay, "Title").State = stateNormal;
 Player.GetSkinItem(typeInfoDisplay, "StatusInfo").State = stateHidden;
}

OnToggleEqState();
OnPlayStateChanged();
}

function OnExit()
{
Metamorphis.SaveSkinState();
}

function OnToggleEqButton()
{  
var Button = Player.GetSkinItem(typeButton, "ToggleEqualizer");  
if(EQ.IsWindowVisible())
{
 EQ.ShowWindow(false);
 
 Button.State = stateNormal;
 Button.Tooltip = "Show Equalizer";
}
else
{  
 EQ.ShowWindow(true);
 
 Button.State = statePressed;
 Button.Tooltip = "Hide Equalizer";
}
}

function OnToggleVisualization()
{  
var Button = Player.GetSkinItem(typeButton, "ToggleVisualization");  
if(Visualization.IsWindowVisible())
{
 Visualization.ShowWindow(false);
 
 Button.State = stateNormal;
 Button.Tooltip = "Show Visualization";
}
else
{
 Visualization.ShowWindow(true);
 
 Button.State = statePressed;
 Button.Tooltip = "Hide Visualization";
}

}

function OnTogglePlaylist()
{
var Button = Player.GetSkinItem(typeButton, "TogglePlaylist");  
if(TextWindow.IsWindowVisible())
{
 TextWindow.ShowWindow(false);
 
 Button.State = stateNormal;
 Button.Tooltip = "Show Play List";
}
else
{
 TextWindow.ShowWindow(true);
 
 Button.State = statePressed;
 Button.Tooltip = "Hide Play List";
}

}

function OnToggleEqState()
{
var EQButton = EQ.GetSkinItem(typeButton, "EQToggle");
if(MJAutomation.GetMJMixer().EQon)
{
 EQButton.State = statePressed;
 EQButton.Tooltip = "EQ ON";
}
else
{
 EQButton.State = stateNormal;
 EQButton.Tooltip = "EQ OFF";
}
}

function OnPlayStateChanged()
{
var PlayState = MJAutomation.GetPlayback().State;
var CurPlaylist = MJAutomation.GetCurPlaylist();
var Duration = MJAutomation.GetPlayback().Duration;

if(Duration <= 0 || PlayState == stateStopped)
 Player.GetSkinItem(typeSlider, "Position").State = stateDisabled;
else
 Player.GetSkinItem(typeSlider, "Position").State = stateNormal;
 
if(PlayState == statePlaying)
{
 Player.GetSkinItem(typeButton, "Play").State = stateDisabled;
 Player.GetSkinItem(typeButton, "Stop").State = stateNormal;
 Player.GetSkinItem(typeButton, "Pause").State = stateNormal;
}
else if(PlayState == stateStopped)
{
 Player.GetSkinItem(typeButton, "Play").State = stateNormal;
 Player.GetSkinItem(typeButton, "Stop").State = stateDisabled;
 Player.GetSkinItem(typeButton, "Pause").State = stateDisabled;
}

if(CurPlaylist.Position |PLS| 1 >= CurPlaylist.GetNumberFiles())
 Player.GetSkinItem(typeButton, "Next").State = stateDisabled;
else
 Player.GetSkinItem(typeButton, "Next").State = stateNormal;
 
if(CurPlaylist.Position > 0 )
 Player.GetSkinItem(typeButton, "Previous").State = stateNormal;
else
 Player.GetSkinItem(typeButton, "Previous").State = stateDisabled;
}

function OnVolumeChanged()
{
if(StatusTimer > 0)  OnStatusTimer();
 
Player.GetSkinItem(typeInfoDisplay, "Title").State = stateHidden;
Player.GetSkinItem(typeInfoDisplay, "StatusInfo").State = stateNormal;

var asdf = MJAutomation.GetMJMixer().Volume;
var Text = "Volume: " |PLS| asdf |PLS| "%";
Player.GetSkinItem(typeInfoDisplay, "StatusInfo").Text = Text;

StatusTimer = Metamorphis.StartTimer(2000, "OnStatusTimer");
}

function OnBalanceChanged()
{
if(StatusTimer > 0)  OnStatusTimer();
 
Player.GetSkinItem(typeInfoDisplay, "Title").State = stateHidden;
Player.GetSkinItem(typeInfoDisplay, "StatusInfo").State = stateNormal;

var asdf = MJAutomation.GetMJMixer().Balance;
var Text = "Balance:  " |PLS| asdf |PLS| "%";
Player.GetSkinItem(typeInfoDisplay, "StatusInfo").Text = Text;

StatusTimer = Metamorphis.StartTimer(2000, "OnStatusTimer");
}

function OnStatusTimer()
{
Metamorphis.StopTimer(StatusTimer);

Player.GetSkinItem(typeInfoDisplay, "Title").State = stateNormal;
Player.GetSkinItem(typeInfoDisplay, "StatusInfo").State = stateHidden;
}
Logged

Frank

  • Guest
RE:MiniSkin redirect
« Reply #5 on: May 31, 2002, 07:35:35 pm »

I really know nothing about java script, and I think what I'm trying to do is pretty simple for most people who know just a bit about it.  Do you think you could help me out, all I'm trying to do is get my skin to come back into the same spot after it is closed and then reopened
Logged

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
RE:MiniSkin redirect
« Reply #6 on: June 03, 2002, 06:04:49 am »

Well, it would be a very long answer if I go into details and you have to have at least some knowlage of JScript language to create MJ skins. Here is the link to JScript:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jsoriJScript.asp

You have to call LoadSkinState() in function linked to OnInitialize event and you have to call SaveSkinState() in function linked to OnExit event.

In main.xml file you have to have this two lines:




In main.js file you have to have this functions implemented:
function OnInitialize()
{
Metamorphis.LoadSkinState();
}

function OnExit()
{
Metamorphis.SaveSkinState();
}


Nikolay
Logged

Frank

  • Guest
RE:MiniSkin redirect
« Reply #7 on: June 03, 2002, 04:46:15 pm »

Thanks man
Logged
Pages: [1]   Go Up