Old 18th September 2002, 20:14   #41
proton078
Junior Member
 
Join Date: Sep 2002
Location: Germany
Posts: 7
Send a message via ICQ to proton078
Re: Re: doesn't work for me

Quote:
Originally posted by spleen

...
I think this was clear enough...
Yes it was, thank you.
proton078 is offline   Reply With Quote
Old 20th September 2002, 01:58   #42
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Exclamation Animated Volume Correction

In trying to help someone use the script, I found a typo in the Animated Volume directions. Step 2 should be:
// 2. Define your gradient map with your other elements using:
// <bitmap id="player.map.volume" file="player/player-map-volume.png"/>
// If you need help creating a map file, check:
// http://www.stefanweb.com/wa3/tutorials.html#UsingMaps

Where the bold type shows the correction.
Sorry for any confusion or trouble this caused anyone.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 23rd September 2002, 06:48   #43
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
AARGH! Another Animated Volume correction.

So much for these being helpful, I've become aware of yet another problem with the volume script. If you were sure you were doing everything right, yet for some reason you kept getting a Null Object Called guru meditation... that would be my fault. I changed the .m but forgot to update the .maki in my zip file that I posted. Rather than me post another zip, you can just compile the .m file in the archive and that will work as is or go to this thread and download the volume.zip found there.
~FrisbeeMonkey
PS. Any requests for any other simple scripts? I'm currently out of ideas.
frisbeemonkey is offline   Reply With Quote
Old 24th September 2002, 00:37   #44
spleen
Senior Member
 
spleen's Avatar
 
Join Date: Feb 2002
Location: Split, Croatia
Posts: 180
Send a message via ICQ to spleen
Quote:
Originally posted by frisbeemonkey
PS. Any requests for any other simple scripts? I'm currently out of ideas.
I'll soon (tommorow) post one script that uses radarboy's idea.
It uses knob as a seeker. You choose direction, clockwise or
anticlockwise, and Wa3 seeks forward or backward. Seeking is faster
as you move further away from middle position. You'll need a knob
animation and a map.

When I finnish it, I'll post it here...

NOTE:
This script can be found in this thread, but that's just a preview
version. It still has some bugs that I plan to fix.
spleen is offline   Reply With Quote
Old 24th September 2002, 10:21   #45
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Talking Animation on startup

I´ve got a question,I´m working on a Car Stereo,it`s nearly done but what is missing is an Animation which starts when WA3 is loaded,I´ve got the PNG file with all the frames necessary for the Animation,my problem is how can i do this now? The Animation is like the OEL-Display Movies known from Pion**r/Kenw**d car Stereos.The area where the animation should start is also the display area where the vis,timer,songticker are.It`s my first skin for WA3 and so far my experience is weak.Could someone help me out with a XML Code and perhaps a Script?

Thanks in advance for your help

PS: sorry for my bad english.
WILDCORE 1K1WS is offline   Reply With Quote
Old 24th September 2002, 10:55   #46
spleen
Senior Member
 
spleen's Avatar
 
Join Date: Feb 2002
Location: Split, Croatia
Posts: 180
Send a message via ICQ to spleen
Re: Animation on startup

Quote:
Originally posted by WILDCORE 1K1WS
I´ve got a question,I´m working on a Car Stereo,it`s nearly done but what is missing is an Animation which starts when WA3 is loaded,I´ve got the PNG file with all the frames necessary for the Animation,my problem is how can i do this now? The Animation is like the OEL-Display Movies known from Pion**r/Kenw**d car Stereos.The area where the animation should start is also the display area where the vis,timer,songticker are.It`s my first skin for WA3 and so far my experience is weak.Could someone help me out with a XML Code and perhaps a Script?
code:
#include "../../../lib/std.mi"

Global AnimatedLayer anlAnimation;

System.onScriptLoaded() {
Layout lytMainNormal = getContainer("main").getLayout("normal");

anlAnimation = lytMainNormal.findObject("Animation");
anlAnimation.setSpeed(50); // 20 fps; set desired speed by yourself
anlAnimation.setAutoReplay(0);
anlAnimation.play();
}

spleen is offline   Reply With Quote
Old 24th September 2002, 11:35   #47
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Unhappy Animation at startup

Okay,that`s nice,much thnx,but how i get this to work with this code?
What i try to say is,is this Code to be compiled for Maki or should i insert it in the XML and make changes there.
The PNG i created includes 31 frames.

Sorry for my dumb questions.
WILDCORE 1K1WS is offline   Reply With Quote
Old 24th September 2002, 13:23   #48
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Unhappy Heres a Screen how it shoul look like

I`ve attached a Screenshot which shows my Main Window and what i exactly want WA3 to do,everytime you start it the Animation is first "played" in the Display Area of the Main window,like i posted before, i dunno how to code this event and how to implement my PNG file which contains 31 frames of the animation.I´m very grateful for your Posting Spleen,but I´m a Newbie to WA3.So if i compile your Code with MC.exe what should i write in my XML?
Attached Images
File Type: png screenshot2.png (45.4 KB, 1116 views)
WILDCORE 1K1WS is offline   Reply With Quote
Old 24th September 2002, 17:11   #49
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
After compiling Spleen's code, you have to include the script in your XML (usually scripts.xml) like this:
<script id="StartUpAnimation" file="scripts/startanim.maki"/>
assuming you called it startanim.maki.
Also, you have to put your Animated Layer in your XML somewhere.
Do you want the image to disappear after the animation is done? If so, you could do it with a slightly more complicated script, or you could just add an empty frame to the end of your animation.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 24th September 2002, 20:26   #50
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Talking

Thnx dude,that helped me much ,you guys are great.I´ll mention you both in the Credits
WILDCORE 1K1WS is offline   Reply With Quote
Old 24th September 2002, 23:42   #51
spleen
Senior Member
 
spleen's Avatar
 
Join Date: Feb 2002
Location: Split, Croatia
Posts: 180
Send a message via ICQ to spleen
Nice skin wildcore. Let me know when you finish it.
spleen is offline   Reply With Quote
Old 25th September 2002, 11:05   #52
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Unhappy D `oh

I have compiled the Code,have included the script in the XML and added the Animated Layer in the XML,and the reslut was the Guru Meditation because of a script failure "... Null Object called"

This is what i used in my XML to make the animation work:

...
<bitmap id="startanim" file="images/swingman.png"/>
...
<script id="startanim" file="scripts/startanim.maki"/>
...
<animatedlayer id="startanim" x="120" y="60"
autoplay="0" image="startupanim" speed="150" framewidth="157"
sysregion="1" realtime="0" alpha="0" ghost="1" autoreplay="0"/>
...
I also want to add that all necessary XML Codes for this skin to work are included in my Skin.xml
WILDCORE 1K1WS is offline   Reply With Quote
Old 25th September 2002, 11:28   #53
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Smile

Okay i thought i attach my whole XML + Script so someone could check it out and tell me if i forgot something/or done something wrong with the Script and XML,i think this is better than posting parts of the XML.

Thnx in advance for help
Attached Files
File Type: zip kenwood.zip (3.6 KB, 822 views)
WILDCORE 1K1WS is offline   Reply With Quote
Old 25th September 2002, 13:23   #54
DirtyLowMoFo
Member
 
Join Date: Aug 2002
Posts: 58
Wildcore

if your animation only has to play on start up, you dont need a script, just put this in your xml:-

____________________________________________________________

<animatedLayer
id="startanim"
x="120" y="60"
w="157" h="put the frame height here"
image="startanim"
autoplay="1"
autoreplay="0"
speed="50"
ghost="1"
/>
________________________________________________________________

the animation will need a blank frame on the end of it(to be transparent) & if it needs to play continuously change the autoreplay value to 1.

hope this helps
DirtyLowMoFo is offline   Reply With Quote
Old 25th September 2002, 13:40   #55
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Talking :D

Yeeeeehaw!!! That worked

It`s perfect,thank you so much
WILDCORE 1K1WS is offline   Reply With Quote
Old 25th September 2002, 17:26   #56
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
ok frisbeemonkey,
your codes r super useful, but iv got one problem:
how do you compile a .maki script?
its probably simple to you, but i know no code, and just enuf XML to code a wa3 skin
it would be really great if someone could help me with this...
hammerhead is offline   Reply With Quote
Old 25th September 2002, 17:43   #57
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
/hangs head in shame
...boy did Spleen and I make that more complicated than it had to be, hehe. Thanks for saving the situation Dirty

Hammerhead,
You compile scripts with mc.exe (found in your winamp3 directory.) I usually copy mc.exe from there to my scripts dir of my skin. Then I create a batch file with the contents:
mc myScript
Then when I run the batch file, myScript.m is compiled into myScript.maki.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 25th September 2002, 20:00   #58
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Smile

thanx
now i can code maki 4 my skin!!!!!!!!!!!!!!!!
hammerhead is offline   Reply With Quote
Old 26th September 2002, 21:38   #59
eleet-2k2
Forum King
 
eleet-2k2's Avatar
 
Join Date: Aug 2001
Location: Mobil Ave.
Posts: 5,381
Cool idea frisbee!!

Why not make this into a package that can be installed using NSIS and host it at SourceForge.Net?

This is very cool. Too bad I dont script and dont have time too.

"Welcome to the Island of people who know too much."..."Did you really think balloons would stop him?!"
See what I'm listening too.
eleet-2k2 is offline   Reply With Quote
Old 27th September 2002, 02:09   #60
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
Ok Frisbee, how 'bout this? A script for animated eq bars, like Wa2.x style. Everything I've tried so far doesn't work the way I want it to. For the most part, when I click on the sliders, they don't update the layer below until I let go. I want the layers to update as I move the sliders. Understand what I'm asking? I hope so. Just look at the way WA2.xx works. I want to emulate that exactly.


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 27th September 2002, 02:38   #61
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Heh, sorry 31337, I don't think these scripts are quite worthy of putting them on SourceForge. I think enough people have access to them here anyways.
Dougieha, I'm guessing you tried the techniques listed in the Skins/Scripting Tips and Tricks sticky? There's an unofficial skin converter that is supposed to emulate WA2 exactly, maybe get a hold of that, see if they do it how you want it? If not, I'll try making something that does. I don't think it should be too different from the animated volume or seek scripts. Lemme know what you find and if you still need my help,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 27th September 2002, 02:53   #62
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
Quote:
Originally posted by frisbeemonkey
Heh, sorry 31337, I don't think these scripts are quite worthy of putting them on SourceForge. I think enough people have access to them here anyways.
Dougieha, I'm guessing you tried the techniques listed in the Skins/Scripting Tips and Tricks sticky? There's an unofficial skin converter that is supposed to emulate WA2 exactly, maybe get a hold of that, see if they do it how you want it? If not, I'll try making something that does. I don't think it should be too different from the animated volume or seek scripts. Lemme know what you find and if you still need my help,
~FrisbeeMonkey
Yeah...I tried the stuff in the Tips and Tricks, but it didn't quite work right, plus some of those are kinda outdated. I'm going to work on modifying the Volume script to do this. One question, how do I get the current slider position for an eq slider?

Or, I'd be thrilled if you could do something, but don't worry too much about it. I might be able to figure it out.


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 27th September 2002, 04:22   #63
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
Ok, I'm thoroughly stumped. I guess I do need some help. Any ideas? I'm not really sure if I need to use animated layers, maps, or what.


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 27th September 2002, 05:06   #64
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
D) All of the above.
I think this problem will need animated layers and maps. I haven't really done anything special with the EQ bands, so I don't know exactly what functions you'll need from std.mi to get/change their values. Right now I am helping someone out with some tricky component skinning, but I should have that done pretty soon. I'll take a look into this problem tomorrow and give you more assistance then.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 27th September 2002, 05:17   #65
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
Cool.

As far as I can tell, these are the slider functions in std.mi:

extern Slider.onSetPosition(int newpos);
extern Slider.onPostedPosition(int newpos);
extern Slider.onSetFinalPosition(int pos);
extern Slider.setPosition(int pos);
extern Int Slider.getPosition();
extern Slider.lock(); // locks descendant core collbacks
extern Slider.unlock(); // unloads them

I'm not sure what the difference between some of them is.

However, it appears that we will need to capture the click on the slider button, see if the position is changing, and animate the layer below accordingly.

My current problem (actually, one of many) is that when I do a .onleftbuttonclick for one of the slider buttons, the image doesn't change to the down state. Not to mention that I can't seem to get the layer to update while the slider is being moved, only when it is set, and the mouse button is released.

I supposed animated layers would help this problem, but I'm not really sure how. I've been skinning for awhile now, but I haven't done much if any MAKI. This is the skin I'm working on this for right now: http://www.winamp.com/skins/detail.j...onentId=121446

As you can see from the screenshot, the layers below the eq buttons are completely static right now, but that's what I'm trying to change.

The original WA2.x skin is here:
http://classic.winamp.com/skins/deta...ponentId=55098

Thanks for all of your help.


Dougieha

PS. Also, we have to update the layers below the sliders when an eq preset is applied, since the sliders positions change, without mouse clicks or movement. This is where the .onSetPosition will probably come in, but that seems to break the image change when you click on the slider.

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 27th September 2002, 10:50   #66
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
This seems to work:
PHP Code:
// never forget to include std.mi
#include "lib/std.mi"

Function updatepre(int v);

Global 
Map PreMap;
Global 
Timer SongTickerTimer;
Global 
Text SongTicker;
Global 
Slider HiddenPre;
Global 
Int PreChangingPreFramesPreFlagTickerExist;
Global 
Group pcGroup;

Global 
Slider Pre;
Global 
AnimatedLayer PreAnim;
Global 
Int PreFrames;
Global 
Group pcGroup;

//When the script is loaded, do this
System.onScriptLoaded() {

    
// Get the group that has the objects we want
    
pcGroup getScriptGroup();

    
// Now that we have the group, get the objects in the group
    
PreAnim pcGroup.findObject("preamp_layer");
    
Pre pcGroup.findObject("preamp");
    
HiddenPre pcGroup.findObject("HiddenPre");
    
SongTicker getContainer("main").getLayout("normal").findObject("songticker");

    
// Initialize our timer
    
SongTickerTimer = new Timer;
    
SongTickerTimer.setDelay(750);

    
// Load the gradient map
    
PreMap = new Map;
    
PreMap.loadMap("player.eq.slider.map");

    
//initialize Preamp variables
    
PreChanging 0;
    
PreFlag 0;
        
PreFrames PreAnim.getLength();
    
PreFrames PreFrames-1;

    
// Set animated Preamp to current Preamp
    
float u;
    
System.getEqPreamp();
    
127;
    
255;
    
PreFrames;
    
PreAnim.gotoFrame(u);
}

// Clears text area
SongTickerTimer.onTimer() {
  
SongTicker.setText("");
  
SongTickerTimer.stop();
}

Pre.onMouseMove(int xint y) {
    if (
PreChanging)  {
        
Pre.getLeft();
        
Pre.getTop();

        if (
PreMap.inRegion(xy)) {
            
float v PreMap.getValue(xy);
            if(
v>123 && v<131){
            
v=125;
            }
        
updatePre(v);
        }
    }
}

// Reads mouse clicks on Preamp slider
Pre.onLeftButtonDown(int xint y) {
    
PreChanging 1;
}

Pre.onLeftButtonUp(int xint y) {
    if (
PreChanging) {
        
Pre.getLeft();
        
Pre.getTop();

        if (
PreMap.inRegion(xy)) {
            
float v PreMap.getValue(xy);
            if(
v>123 && v<131){
            
v=125;
            }
            
updatePre(v);
        }
        
PreChanging 0;
    }
}

// Updates Preamp after drag/click
updatePre(float v) {
    if (
>= 0) {
        
float k 255;
        
int g PreFrames;
        
PreAnim.gotoFrame(g);
        
System.setEqPreamp(v-127);

        
float p = (v-127)/6.35;
        
SongTickerTimer.stop();
        
SongTickerTimer.start();
        
SongTicker.setText("PreAmp " System.integerToString(p) + "dB");
     }
}
// Reads System Preamp Changes
HiddenPre.onSetPosition(int p){
float f System.getEqPreamp();
127;
f/255;
PreFrames;
PreAnim.gotoFrame(f);

Just a few very minor issues with snapping to the middle level, depending on where you click on the button, it changes where the middle level is...kinda hard to explain. And, of course, this has to be replicated 10 times over for each of the eq bands, too.

I'll post a revised version of my skin, probably tomorrow, once I get some sleep tonight.


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 27th September 2002, 11:47   #67
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
And here is the final version. It's an attachment, 'cause it's a darn long script file.


Dougieha
Attached Files
File Type: m eq_layers.m (18.6 KB, 913 views)

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 27th September 2002, 17:51   #68
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Nice! Glad you were able to figure this out so quickly and thanks for donating the code to this collection. I haven't had a chance to try this out, but I am sure it will help a lot of people out.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 27th September 2002, 20:58   #69
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
I'm still working on getting some of the bugs out.

Also, look here: http://forums.winamp.com/showthread.php?threadid=107338

Any ideas?


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 28th September 2002, 02:24   #70
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
Ok...please ignore the previous script!

Could an administrator please remove that link?

Here is the new, revised, and completed version. I completely revised the hooking for system eq changes, and I also revised the snapping function.

Enjoy!


Dougieha
Attached Files
File Type: m eq_layers.m (19.0 KB, 923 views)

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 28th September 2002, 13:17   #71
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
ok, I know this is waaaaaaaaay too late, but I'm gonna tell it anyway..
There's a much much simpler way to acheive what you wanted..
I know the released version of the converter is outdated and doesnt work so well in those areas, but the unreleased version I'm working on have fully working sliders with alot less code than yours..

this is the script for it, it's for all the EQ-sliders
PHP Code:
// ------------------------------------
// Ohh My God... I Actualy Made A Full MAKI Script
// by Bizzy D. (darren horrocks)
// ------------------------------------
// updated by spleen (Tonci Damjanic)

#include "../../../lib/std.mi"

Function updateSlider(int numberint value);

Global 
Boolean ResetClicked=0Load;
Global 
Slider preeq1eq2eq3eq4eq5eq6eq7eq8eq9eq10;
Global 
Layer pre_layereq1backeq2backeq3backeq4backeq5backeq6backeq7backeq8backeq9backeq10back;
Global 
String XMLText;
Global 
Button butSetMaxbutResetbutSetMin;

System.onScriptLoaded() {
  
Layout lytEqNormal getContainer("eq").getlayout("normal");

  
pre lytEqNormal.getObject("preamp");
  
pre_layer lytEqNormal.getObject("preamp_layer");
  
eq1 lytEqNormal.getObject("eq1");
  
eq1back lytEqNormal.getObject("eq1back");
  
eq2 lytEqNormal.getObject("eq2");
  
eq2back lytEqNormal.getObject("eq2back");
  
eq3 lytEqNormal.getObject("eq3");
  
eq3back lytEqNormal.getObject("eq3back");
  
eq4 lytEqNormal.getObject("eq4");
  
eq4back lytEqNormal.getObject("eq4back");
  
eq5 lytEqNormal.getObject("eq5");
  
eq5back lytEqNormal.getObject("eq5back");
  
eq6 lytEqNormal.getObject("eq6");
  
eq6back lytEqNormal.getObject("eq6back");
  
eq7 lytEqNormal.getObject("eq7");
  
eq7back lytEqNormal.getObject("eq7back");
  
eq8 lytEqNormal.getObject("eq8");
  
eq8back lytEqNormal.getObject("eq8back");
  
eq9 lytEqNormal.getObject("eq9");
  
eq9back lytEqNormal.getObject("eq9back");
  
eq10 lytEqNormal.getObject("eq10");
  
eq10back lytEqNormal.getObject("eq10back");

  
butSetMax lytEqNormal.getObject("setMax");
  
butReset  lytEqNormal.getObject("reset");
  
butSetMin lytEqNormal.getObject("setMin");

  
Load=1;
  for (
int i=0i<=10i++) updateSlider(i,0);
  
Load=0;
}

updateSlider(int numberint value) {
  
Slider sliTemp;
  
Layer lyrTemp;

  if (
number==0) { sliTemp=prelyrTemp=pre_layer; }
  if (
number==1) { sliTemp=eq1lyrTemp=eq1back; } if (number==2) { sliTemp=eq2lyrTemp=eq2back; }
  if (
number==3) { sliTemp=eq3lyrTemp=eq3back; } if (number==4) { sliTemp=eq4lyrTemp=eq4back; }
  if (
number==5) { sliTemp=eq5lyrTemp=eq5back; } if (number==6) { sliTemp=eq6lyrTemp=eq6back; }
  if (
number==7) { sliTemp=eq7lyrTemp=eq7back; } if (number==8) { sliTemp=eq8lyrTemp=eq8back; }
  if (
number==9) { sliTemp=eq9lyrTemp=eq9back; } if (number==10) { sliTemp=eq10lyrTemp=eq10back; }

  if (
ResetClickedsliTemp.setPosition(value);

  if (
LoadXMLText "wa2.player.eq.slider" System.integerToString((sliTemp.getPosition()/255)*27);
  else 
XMLText "wa2.player.eq.slider" System.integerToString((value/255)*27);
  
lyrTemp.setXMLParam("image",XMLText);
}

pre.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(0,newpos); }
eq1.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(1,newpos); }
eq2.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(2,newpos); }
eq3.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(3,newpos); }
eq4.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(4,newpos); }
eq5.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(5,newpos); }
eq6.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(6,newpos); }
eq7.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(7,newpos); }
eq8.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(8,newpos); }
eq9.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(9,newpos); }
eq10.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(10,newpos); }

butSetMax.onLeftClick() {
  
ResetClicked=1;
  for (
int i=1i<=10i++) updateSlider(i,255);
  
ResetClicked=0;
}

butReset.onLeftClick() {
  
ResetClicked=1;
  for (
int i=1i<=10i++) updateSlider(i,127);
  
ResetClicked=0;
}

butSetMin.onLeftClick() {
  
ResetClicked=1;
  for (
int i=1i<=10i++) updateSlider(i,0);
  
ResetClicked=0;

and here's the xml:
PHP Code:
    <button id="setMax" x="40" y="36" w="28" h="8"/>
    <
button id="reset"  x="40" y="64" w="28" h="8"/>
    <
button id="setMin" x="40" y="94" w="28" h="8"/>

<!-- 
Backgrounds -->

    <
animatedlayer
      id
="preamp_layer"
      
x="21" y="38"
      
image="wa2.player.eq.slider0"
    
/>

    <
animatedlayer
      id
="eq1back"
      
x="78" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq2back"
      
x="96" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq3back"
      
x="114" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq4back"
      
x="132" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq5back"
      
x="150" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq6back"
      
x="168" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq7back"
      
x="186" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq8back"
      
x="204" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq9back"
      
x="222" y="38"
      
image="wa2.player.eq.slider0"
    
/>
    <
animatedlayer
      id
="eq10back"
      
x="240" y="38"
      
image="wa2.player.eq.slider0"
    
/>


    <
slider
      id
="preamp"
      
action="EQ_PREAMP"
      
x="22" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq1"
      
action="EQ_BAND"
      
param="1"
      
x="79" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq2"
      
action="EQ_BAND"
      
param="2"
      
x="97" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq3"
      
action="EQ_BAND"
      
param="3"
      
x="115" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq4"
      
action="EQ_BAND"
      
param="4"
      
x="133" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq5"
      
action="EQ_BAND"
      
param="5"
      
x="151" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq6"
      
action="EQ_BAND"
      
param="6"
      
x="169" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq7"
      
action="EQ_BAND"
      
param="7"
      
x="187" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq8"
      
action="EQ_BAND"
      
param="8"
      
x="205" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq9"
      
action="EQ_BAND"
      
param="9"
      
x="223" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/>

    <
slider
      id
="eq10"
      
action="EQ_BAND"
      
param="10"
      
x="241" y="38"
      
w="11" h="62"
      
orientation="vertical"
      
thumb="wa2.player.eq.slider.up"
      
downThumb="wa2.player.eq.slider.down"
    
/> 
with the elements here:
PHP Code:
    <bitmap id="wa2.player.eq.slider.up" file="gfx/eqmain.png" x="0" y="164" h="11" w="11"/>
    <
bitmap id="wa2.player.eq.slider.down" file="gfx/eqmain.png" x="0" y="176" h="11" w="11"/>


    <!-- 
EQ Slider Thingies -->
    <
bitmap id="wa2.player.eq.slider0" file="gfx/eqmain.png"  x="13" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider1" file="gfx/eqmain.png"  x="28" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider2" file="gfx/eqmain.png"  x="43" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider3" file="gfx/eqmain.png"  x="58" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider4" file="gfx/eqmain.png"  x="73" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider5" file="gfx/eqmain.png"  x="88" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider6" file="gfx/eqmain.png"  x="103" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider7" file="gfx/eqmain.png"  x="118" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider8" file="gfx/eqmain.png"  x="133" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider9" file="gfx/eqmain.png"  x="148" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider10" file="gfx/eqmain.png"  x="163" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider11" file="gfx/eqmain.png"  x="178" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider12" file="gfx/eqmain.png"  x="193" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider13" file="gfx/eqmain.png"  x="208" y="164" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider14" file="gfx/eqmain.png"  x="13" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider15" file="gfx/eqmain.png"  x="28" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider16" file="gfx/eqmain.png"  x="43" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider17" file="gfx/eqmain.png"  x="58" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider18" file="gfx/eqmain.png"  x="73" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider19" file="gfx/eqmain.png"  x="88" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider20" file="gfx/eqmain.png"  x="103" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider21" file="gfx/eqmain.png"  x="118" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider22" file="gfx/eqmain.png"  x="133" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider23" file="gfx/eqmain.png"  x="148" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider24" file="gfx/eqmain.png"  x="163" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider25" file="gfx/eqmain.png"  x="178" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider26" file="gfx/eqmain.png"  x="193" y="229" h="63" w="14"/>
    <
bitmap id="wa2.player.eq.slider27" file="gfx/eqmain.png"  x="208" y="229" h="63" w="14"/> 
this works with the image files directly taken from WA2 skins, no changes to them needed..

Hope you'll have any use of this
If you want the working code for Volume and Balance sliders, just let me know..

-Plague
Plague is offline   Reply With Quote
Old 28th September 2002, 21:56   #72
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
Yeah...that is a simpler method. I did look at the code from the old WA2->3 skin converter, but it didn't do what I wanted.

Here's my version of your script, using AnimatedLayers (since I already made them, it just made life easier to use them):

PHP Code:
//----------------------------------------------------------------------
//    eq_layers.m
//
//    A Script By:
//    ThePlague
//
//    Edited by Doug Halamay
//    for use of AnimatedLayers
//
//    This script animates the bars
//    underneath your eq sliders
//    just like WA2.xx
//
//----------------------------------------------------------------------

#include "../../../lib/std.mi"
Function updateSlider(int numberint value);
Global 
Boolean ResetClicked=0Load;
Global 
Slider preeq1eq2eq3eq4eq5eq6eq7eq8eq9eq10;
Global 
AnimatedLayer pre_layereq1backeq2backeq3backeq4backeq5backeq6backeq7backeq8backeq9backeq10back;
Global 
String XMLText;
Global 
Button butSetMaxbutResetbutSetMin;
System.onScriptLoaded() {
  
Group lytEqNormal getScriptGroup();
  
pre lytEqNormal.findObject("preamp");
  
pre_layer lytEqNormal.findObject("preamp_layer");
  
eq1 lytEqNormal.findObject("eq1");
  
eq1back lytEqNormal.findObject("eq1back");
  
eq2 lytEqNormal.findObject("eq2");
  
eq2back lytEqNormal.findObject("eq2back");
  
eq3 lytEqNormal.findObject("eq3");
  
eq3back lytEqNormal.findObject("eq3back");
  
eq4 lytEqNormal.findObject("eq4");
  
eq4back lytEqNormal.findObject("eq4back");
  
eq5 lytEqNormal.findObject("eq5");
  
eq5back lytEqNormal.findObject("eq5back");
  
eq6 lytEqNormal.findObject("eq6");
  
eq6back lytEqNormal.findObject("eq6back");
  
eq7 lytEqNormal.findObject("eq7");
  
eq7back lytEqNormal.findObject("eq7back");
  
eq8 lytEqNormal.findObject("eq8");
  
eq8back lytEqNormal.findObject("eq8back");
  
eq9 lytEqNormal.findObject("eq9");
  
eq9back lytEqNormal.findObject("eq9back");
  
eq10 lytEqNormal.findObject("eq10");
  
eq10back lytEqNormal.findObject("eq10back");

  
butSetMax lytEqNormal.findObject("setMax");
  
butReset  lytEqNormal.findObject("reset");
  
butSetMin lytEqNormal.findObject("setMin");
  
Load=1;
  for (
int i=0i<=10i++) updateSlider(i,0);
  
Load=0;
}
updateSlider(int numberint value) {
  
Slider sliTemp;
  
AnimatedLayer lyrTemp;
  if (
number==0) { sliTemp=prelyrTemp=pre_layer; }
  if (
number==1) { sliTemp=eq1lyrTemp=eq1back; } if (number==2) { sliTemp=eq2lyrTemp=eq2back; }
  if (
number==3) { sliTemp=eq3lyrTemp=eq3back; } if (number==4) { sliTemp=eq4lyrTemp=eq4back; }
  if (
number==5) { sliTemp=eq5lyrTemp=eq5back; } if (number==6) { sliTemp=eq6lyrTemp=eq6back; }
  if (
number==7) { sliTemp=eq7lyrTemp=eq7back; } if (number==8) { sliTemp=eq8lyrTemp=eq8back; }
  if (
number==9) { sliTemp=eq9lyrTemp=eq9back; } if (number==10) { sliTemp=eq10lyrTemp=eq10back; }

  if (
ResetClicked) {
    
sliTemp.setPosition(value);
lyrTemp.goToFrame((sliTemp.getPosition()/255)*27);
}
  if (
Loadlyrtemp.goToFrame((sliTemp.getPosition()/255)*27);
  else 
lyrtemp.goToFrame((value/255)*27);
}
pre.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(0,newpos); }
eq1.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(1,newpos); }
eq2.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(2,newpos); }
eq3.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(3,newpos); }
eq4.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(4,newpos); }
eq5.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(5,newpos); }
eq6.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(6,newpos); }
eq7.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(7,newpos); }
eq8.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(8,newpos); }
eq9.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(9,newpos); }
eq10.onSetPosition(int newpos) { if (!ResetClickedupdateSlider(10,newpos); }
butSetMax.onLeftClick() {
  
ResetClicked=1;
  for (
int i=1i<=10i++) updateSlider(i,255);
  
ResetClicked=0;
}

butReset.onLeftClick() {
  
ResetClicked=1;
  for (
int i=1i<=10i++) updateSlider(i,127);
  
ResetClicked=0;
}
butSetMin.onLeftClick() {
  
ResetClicked=1;
  for (
int i=1i<=10i++) updateSlider(i,0);
  
ResetClicked=0;


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.

Last edited by dougieha; 29th September 2002 at 00:02.
dougieha is offline   Reply With Quote
Old 28th September 2002, 22:23   #73
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
And here's my new version of the volume script, thanks to ThePlague:

PHP Code:
//-----------------------------------------------------------------------------
// volume.m
//
// Example of an animated volume slider
//
// Inspired by ThePlague and frisbeemonkey
// edited by Doug Halamay (aka Dougieha) for SonyMPFX3-WA3
//-----------------------------------------------------------------------------

// never forget to include std.mi
#include "../../../lib/std.mi"

//declares volume functions
Function updateVolume(int v);

//declares global variables
Global AnimatedLayer Volume;
Global 
Slider VolumeSlide;
Global 
Group pcGroup;

//When the script is loaded, do this
System.onScriptLoaded() {

    
// Get the group that has the objects we want
    
pcGroup getScriptGroup();

    
// Now that we have the group, get the objects in the group
    
Volume pcGroup.findObject("VolumeLayer");
    
VolumeSlide pcGroup.findObject("Volume");

    
// Set animated volume to current volume
    
updateVolume(VolumeSlide.getPosition());

}

// Updates Volume after drag/click
updateVolume(int v) {
        
Volume.gotoFrame((v/255)*27);
}

// Reads System Volume Changes
VolumeSlide.onSetPosition(int p) {
    
updateVolume(p);
}

VolumeSlide.onPostedPosition(int p) {
    
updateVolume(p);

There you go...it works perfectly, with an animated Volume layer.


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 28th September 2002, 22:42   #74
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
what's the difference between our eq-layers scripts?

btw, the one I showed you isn't done by me, it's done by Bizzy D and Spleen (I might have made some updates to it too, but I'm not sure about that)..
Just to set the record straight
Oh, but the xml I showed you was done by me, mostly..

-Plague
Plague is offline   Reply With Quote
Old 28th September 2002, 22:46   #75
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
Here are only the lines I changed:


code:

Global AnimatedLayer pre_layer, eq1back, eq2back, eq3back, eq4back, eq5back, eq6back, eq7back, eq8back, eq9back, eq10back;


Group lytEqNormal = getScriptGroup();


AnimatedLayer lyrTemp;


if (ResetClicked) {

sliTemp.setPosition(value);
lyrTemp.goToFrame((sliTemp.getPosition()/255)*27);

}

if (Load) lyrtemp.goToFrame((sliTemp.getPosition()/255)*27);

else lyrtemp.goToFrame((value/255)*27);

}



Basically, I adapted it for Animated Layers.


Dougieha

My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 28th September 2002, 23:06   #76
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
you dont use sliders at all?
cos the example I showed you have animatedlayers too..
They are not loaded as animatedlayers in maki, but that's on purpose..

I'm just wondering

-Plague
Plague is offline   Reply With Quote
Old 29th September 2002, 00:04   #77
dougieha
Senior Member
 
dougieha's Avatar
 
Join Date: May 2001
Posts: 236
The difference is that you have sliders 0 through 27 defined in your elements, and I just have 1 image.

I don't have to specify frame by frame, cause the .gotoFrame statement figures that out for you.

It saves you from having to parse together your XMLText line.

You might want to see if you could adapt this technique to the converter. You'd just have to grab each frame of the sliders from the eqmain.bmp and place them side-by-side (literally, right next to each other) in one file. I don't program much, so I'm not sure how difficult this would be, but it'd be cool if you could do it.


Dougieha

edit: For example, these three lines in my eq-elements.xml take care of everything needed for the sliders.

code:

<bitmap id="player.eq.slider.anim" file="equalizer/slideranim.png"/>
<bitmap id="player.eq.slider.button" file="equalizer/button-up.png"/>
<bitmap id="player.eq.slider.button.pressed" file="equalizer/button-down.png"/>



My skins: Sony MPFX3-WA5 (Just for WA 5.x!!) and Sony MPFX3.
dougieha is offline   Reply With Quote
Old 29th September 2002, 00:41   #78
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
yeah, I know how easy that would be and stuff..
but the problem is that the converter isn't meant to mess with the files...
this works fine with the original files, and that's the whole purpose..

-Plague
Plague is offline   Reply With Quote
Old 7th October 2002, 13:44   #79
Dynamik
Senior Member
 
Dynamik's Avatar
 
Join Date: Sep 2002
Location: da G funk era
Posts: 173
Send a message via AIM to Dynamik
Hey guys, Kick ass thread!
I can actually learn MAKI without my brain overheating! But for some reason I can't get my friggin drawer to work! I think I followed the instructions to the nutt, But I'm boggled!
How do I tell it where I click to open/close the drawer?

I even tried the handleover code, and still, it doesnt recognize it!
My drawer drops down so I think this is what my XML should look like:
<layout id="normal" background="eq.background" >
<group id="Drawergroup" x="35" y="100" sysregion="1" />
</layout>

<groupdef id="DrawerGroup" background="eq.drawer.back" w="290" h="81"> <!-- 0,81 -->

<layer id="Drawer" image="eq.drawer" x="0" y="0" sysregion="1" move="0"/>
<layer id="DrawerHandle" image="eq.drawer.face" x="0" y="0" ghost="1"/>
<layer id="DrawerHandleOver" image="eq.drawer.face.over" x="0" y="0" ghost="1"/>

<script id="drawer" file="scripts/drawer.maki"/>
</groupdef>
I'ts probably sumthin easy to you guys!
I've tried everything I can think of, Thank god there are smart people like you out there! But once I get over this stump, it wont be long before I'm dialed in to MAKI and help others like me!
Dynamik is offline   Reply With Quote
Old 7th October 2002, 15:18   #80
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
remove ghost="1"

-Plague
Plague is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump