Old 6th September 2002, 18:46   #1
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Exclamation MAKI Cheats

In an effort to allow coders of all skill levels to have at least basic MAKI functions in their skins, I've begun making a set of pre-made scripts that you drop into your scripts folder, change some of your XML, and voila you have a working drawer/animated seek/whatever. Subsequent posts will include the zipped m and maki files, as well as directions for using them. So far, none of them even need recompiling, you can just use the included maki. I will note if any later ones do need compiling.
***Many of these scripts assume that you have a songticker already defined in your XML. If you don't have a songticker, chances are the script is gonna generate some guru meditations.
If you run into any problems, make sure you followed the included directions(they're in the .m as well as the post) and that the ids are right in your XML. If you still have trouble, then ask here.
Enjoy!
~FrisbeeMonkey
PS Current scripts planned are: Drawer, Play2Pause, AnimatedSeek, AnimatedVolume, VoumeKnob(uses rotation), AutoRepeating Volume Buttons. If anyone has any requests or scripts to volunteer, please let me know.
frisbeemonkey is offline   Reply With Quote
Old 6th September 2002, 18:50   #2
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Drawer

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define a drawer group in your XML.
// 2. Add your background layer to the group, something like:
// <layer id="Drawer" image="player.Drawer" x="0" y="0" sysregion="1"/>
// You can change any of the values but the id and sysregion
// 3. Add a layer to pass info to this script, something like:
// <layer id="DrawerInfo" x="13" y="0"/>
// Set x and y to where you want your drawer to slide to
// 3. Add any other objects(layers, buttons, sliders, etc) to your group
// 4. Copy this script (and drawer.maki) to your scripts folder.
// 5. If you don't have drawer.maki, compile this script.
// 6. Add this line to the group that you want to be a drawer:
// <script id="drawer" file="scripts/drawer.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************

// EXAMPLE XML
//=============================================================================
//<groupdef id="DrawerGroup" w="39" h="158"> <!-- 39,0 -->
//
// <layer id="Drawer" image="player.Drawer" x="0" y="0" sysregion="1" move="0"/>
// <layer id="DrawerInfo" x="13" y="0"/>
// //add other objects that you want to move with the drawer here
//
// <script id="drawer" file="scripts/drawer.maki"/>
//</groupdef>
//=============================================================================
// ***Don't forget to place your group somewhere in your layout!***
// <group id="DrawerGroup" x="47" y="0"/>
Attached Files
File Type: zip drawer.zip (2.3 KB, 2329 views)
frisbeemonkey is offline   Reply With Quote
Old 6th September 2002, 18:52   #3
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Play2Pause

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define play and pause buttons in your XML.
// 2. Make sure their ids are "Play" and "Pause"
// 3. Copy this script (and play2pause.maki) to your scripts folder.
// 4. If you don't have play2pause.maki, compile this script.
// 5. Add this line to the group that contains your play and pause buttons:
// <script id="play2pause" file="scripts/play2pause.maki"/>
// 6. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip play2pause.zip (1.9 KB, 1889 views)
frisbeemonkey is offline   Reply With Quote
Old 6th September 2002, 18:53   #4
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Animated Seek

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define the following in your XML:
// <AnimatedLayer
// id="SeekAnim"
// x="121" y="231"
// w="25" h="25"
// image="player.anim.seek"
// move="0"
// autoplay="0"
// autoreplay="0"
// />
//
// <slider id="HiddenSeek"
// ACTION="Seek" x="0" y="0" w="40" h="2"
// thumb="player.anim.seek"
// alpha="0"
// />
// Change the position(x,y) and size(w,h) of "SeekAnim" to the specifics
// of your layer. (w and h refer to just one frame, not the whole image)
// "HiddenSeek" is a dummy layer to get updates to the song position, no
// changes are needed.
// 2. Define your gradient map with your other elements using:
// <bitmap id="player.map.seek" file="player/player-map-seek.png"/>
// If you need help creating a map file, check:
// http://www.stefanweb.com/wa3/tutorials.html#UsingMaps
// 3. Make sure your ticker is called "SongTicker" and is in the same group as
// "SeekAnim" and "HiddenSeek" If you don't have a ticker, add one now.
// 4. Copy this script (and seek.maki) to your scripts folder.
// 5. If you don't have seek.maki, compile this script.
// 6. Add this line to the group that contains your animated layer
// <script id="seek" file="scripts/seek.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip seek.zip (3.4 KB, 1665 views)
frisbeemonkey is offline   Reply With Quote
Old 6th September 2002, 18:55   #5
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
VolumeKnob

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define the following in your XML:
// <layer id="VolumeKnob" image="player.VolumeKnob" x="409" y="7" move="0"/>
//
// <slider id="HiddenVolume"
// ACTION="Volume" x="0" y="0" w="40" h="2"
// thumb="player.VolumeKnob"
// alpha="0"
// />
// Change the position(x,y) of "VolumeKnob" to the specifics
// of your layer. Make sure the image is facing where you want 0 to be.
// "HiddenVolume" is a dummy layer to get updates to the volume, no
// changes are needed.
// 2. Define your gradient map with your other elements using:
// <bitmap id="player.map.volknob" file="player/VolKnobMap.png"/>
// If you need help creating a map file, check:
// http://www.stefanweb.com/wa3/tutorials.html#UsingMaps
// 3. Make sure your ticker is called "SongTicker" and is in the same group as
// "VolumeKnob" and "HiddenVolume" If you don't have a ticker, add one now.
// 4. Copy this script (and volumeknob.maki) to your scripts folder.
// 5. If you don't have volumeknob.maki, compile this script.
// 6. Add this line to the group that contains your animated layer
// <script id="volumeknob" file="scripts/volumeknob.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip volumeknob.zip (3.9 KB, 1715 views)
frisbeemonkey is offline   Reply With Quote
Old 6th September 2002, 22:51   #6
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
man, this is uber useful!
we need more of this!

one of the most annoying things when skinning is having to create new scripts just for basic functions, scripts like theese..

so I think it's a great idea that you've taken this step.

Good job

-Plague
Plague is offline   Reply With Quote
Old 7th September 2002, 01:50   #7
lakitu42
Senior Member
 
lakitu42's Avatar
 
Join Date: Jun 2002
Location: The darkest recesses of your mind (Ontario)
Posts: 139
Send a message via AIM to lakitu42 Send a message via Yahoo to lakitu42
There's some scripts here as well. They're not precompiled or ready to use, but people should learn some basic stuff, and look over std.mi, because one day they'll want to do something and it won't be predone for them. That's nice what you're doing though, just some simple general purpose stuff. /me likes

PS If I sounded a little pissed up there, sorry. I just meant that if someone uses predone scripts for their first couple of skins, they might want to do something a bit more complicated and be totally lost.
lakitu42 is offline   Reply With Quote
Old 7th September 2002, 02:38   #8
rintaro82
Junior Member
 
rintaro82's Avatar
 
Join Date: Jul 2001
Posts: 25
This is all very useful stuff, and I'm sure many people, including myself, appreciate your efforts to help out the skinning community. But I'd like to see what the finished xml looks like. A lot of the comments you've put into the scripts assume that the reader knows what all this scripting talk is about, and I for one don't. This is all new to me (and I'm sure thousands of other future skinners) and can be quite frustrating with the scant documentation I've been able to find on the Winamp site.

I'm not an idiot. I've been programming for quite some time now (20 years, give or take). I have also gone through the myriad WA3 tutorials, found articles on the web, disected numerous skins, andsuccessfully gotten the rudiments going, but I'm still lost at this point. Could someone, ANYONE, make a simple skin that utilizes these advanced components (irregular seekers, volume bars, play to pause, etc) so that we can see what the working xml looks like?
rintaro82 is offline   Reply With Quote
Old 7th September 2002, 13:47   #9
will
Nullsoft Newbie (Moderator)
 
will's Avatar
 
Join Date: Mar 2001
Location: Sheffield, England
Posts: 5,569
i made a while ago an autorepeatbutton script.
The link is here: http://forums.winamp.com/showthread.php?threadid=78994, and it still works great and is uber easy to use. It is used in my BOOM skin, and others.

DO NOT PM ME WITH TECH SUPPORT QUESTIONS
will is offline   Reply With Quote
Old 7th September 2002, 20:48   #10
Paikan
Member
 
Join Date: May 2002
Location: Paris
Posts: 76
Send a message via ICQ to Paikan
Error
Paikan is offline   Reply With Quote
Old 7th September 2002, 20:55   #11
Paikan
Member
 
Join Date: May 2002
Location: Paris
Posts: 76
Send a message via ICQ to Paikan
frisbeemonkey -> great job you have done here but i have comments .
I have tried to use your sliders script for seeker with animated image and map pic on it. That works correctly but there are 3 problems:
1) i am in position A of time when i left click on my seeker (here i see the seeker go to the right position let s say position B) and i do not move and not release the left button after a short time the seeker goes back to position A. Then if i load your maki skin and reload mine strangely that works correctly.
2) i can seek only from 0:02 to 3:02 ( for a song lenght of 3:04)
is there an explanation on that (my map seems correct)?
3) What should i do if i want this: when i click on seeker and i don t release the button and go outside the seeker i would like that my moves outside the strict area of the seeker makes the seeker moves

i doubt a lot of ppl will understand what i am saying cause of my english damn

Willfisher -> what is an autorepeatbutton?
Paikan is offline   Reply With Quote
Old 8th September 2002, 02:11   #12
Paikan
Member
 
Join Date: May 2002
Location: Paris
Posts: 76
Send a message via ICQ to Paikan
Ok i have corrected the problems i have by changing this i think it is better like that:

Seek.onLeftButtonDown(int x, int y) {
if (getPlayItemLength() > 0) {
SongPlayTimer.stop();
SeekChanging = 1;
updateSeeker(x, y);
}
}


Seek.onLeftButtonUp(int x, int y) {
Float l;
if (SeekChanging) {
l = seekMap.getValue(x - Seek.getLeft(), y - Seek.getTop());

if (l > 0) {
if (System.getPlayItemLength() >= 0) {
l = (l / 255) * System.getPlayItemLength();
System.seekTo(l);
}
}

SeekChanging = 0;
SongPlayTimer.start();
}
}
Paikan is offline   Reply With Quote
Old 8th September 2002, 13:44   #13
CraigF
Passionately Apathetic
Administrator
 
CraigF's Avatar
 
Join Date: May 2000
Location: Hell
Posts: 5,436
wow, great work, keep it up guys!

*stuck*

CraigF is offline   Reply With Quote
Old 8th September 2002, 15:26   #14
will
Nullsoft Newbie (Moderator)
 
will's Avatar
 
Join Date: Mar 2001
Location: Sheffield, England
Posts: 5,569
Quote:
Originally posted by Paikan
Willfisher -> what is an autorepeatbutton?
if you want to not have a slider for volume adjustment, and up and down buttons instead, you will want to be able to press and hold the button to keep the volume going up. Normal buttons don't do this, but you can if you use my autorepeat button lib.

DO NOT PM ME WITH TECH SUPPORT QUESTIONS
will is offline   Reply With Quote
Old 8th September 2002, 15:28   #15
Paikan
Member
 
Join Date: May 2002
Location: Paris
Posts: 76
Send a message via ICQ to Paikan
Wow great i'm going to use it
Thanks Will
Paikan is offline   Reply With Quote
Old 9th September 2002, 01:44   #16
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Haha, I came back from my hiking trip this weekend, logged onto the forums, couldn't find this thread. Thought it must have sunk to page 2 already and was figuring no one was gonna get anything from it. Never thought I would find it stickified.
Anyways, I am glad to find people are benefitting from it. I'll be adding some more tonight or tomorrow sometime.
->lakitu42: heh, no worries, I didn't think you came across sounding angry or anything. I totally agree, in order to do more complicated things, people are gonna need to learn to love std.mi and learn how to code for themselves. I figured this would help out those who either have no interest in learning MAKI, or, like me, like to have working examples in front of them(hence my bothering to include .m's) so they can get a better grasp of how the basics work before they go on to bigger things. Also, thanks for that link, didn't know of that resource.
->rintaro82: Look around, I bet you can find a skin that demonstrates basic stuff like this... Or to save you time, just go to http://forums.winamp.com/showthread....hreadid=103493 Actually you may want to wait, I am gonna repost that skin using these exact scripts(right now they are the same scripts as these but written specifically for that skin) Let me know if you find that skin helpful, or if you find it lacking anywhere.
->willfisher: thanks for that script, I've been planning on posting a script that uses your code(you are credited, fear not!) to make it even easier to use for volume control.
->Paikan: Double thanks to you my friend! First catching a bug, then fixing it before I even looked at it I'll repost that script with those corrections. Did you have any success with your other two questions? If not, I'll look into them. And your English is fine
Until next time,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 9th September 2002, 04:01   #17
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Animated Seek.... Take 2

Here's a fixed animated seek script. See the first anim seek post(or just read the included .m) for how to use it. Thanks go to Paikan for the correction.
~FrisbeeMonkey
Attached Files
File Type: zip seek.zip (3.4 KB, 1345 views)
frisbeemonkey is offline   Reply With Quote
Old 9th September 2002, 04:04   #18
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
AutoRepeating Volume Buttons

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define VolUp and VolDown buttons in your XML, something like:
// <button
// id="VolUp"
// x="424" y="39"
// image="player.IncVolUp"
// downImage="player.IncVolDown"
// tooltip="+ Volume +"
// />
// <button
// id="VolDown"
// x="408" y="45"
// image="player.DecVolUp"
// downImage="player.DecVolDown"
// tooltip="- Volume -"
// />

// 2. Make sure their ids are "VolUp" and "VolDown"
// 3. Make sure your ticker is called "SongTicker" and is in the same group as
// "VolUp" and "VolDown" If you don't have a ticker, add one now.
// 4. Copy this script and autorepeatvolumebuttons.maki to your scripts folder.
// 5. If you don't have autorepeatvolumebuttons.maki, compile this script
// (you'll need the AutoRepeatButton.m included in this zip)
// 6. Add this line to the group that contains your volume buttons:
// <script id="ARVB" file="scripts/autorepeatvolumebuttons.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip autorepvol.zip (3.9 KB, 1439 views)
frisbeemonkey is offline   Reply With Quote
Old 9th September 2002, 21:16   #19
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Animated Volume

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define the following in your XML:
// <AnimatedLayer
// id="VolumeAnim"
// x="121" y="231"
// w="25" h="25"
// image="player.anim.volume"
// move="0"
// autoplay="0"
// autoreplay="0"
// />
//
// <slider id="HiddenVolume"
// ACTION="Volume" x="0" y="0" w="40" h="2"
// thumb="player.anim.volume"
// alpha="0"
// />
// Change the position(x,y) and size(w,h) of "VolumeAnim" to the specifics
// of your layer. (w and h refer to just one frame, not the whole image)
// "HiddenVolume" is a dummy layer to get volume updates, no
// changes are needed.
// 2. Define your gradient map with your other elements using:
// <bitmap id="player.map.vol" file="player/player-map-volume.png"/>
// If you need help creating a map file, check:
// http://www.stefanweb.com/wa3/tutorials.html#UsingMaps
// 3. Make sure your ticker is called "SongTicker" and is in the same group as
// "VolumeAnim" and "HiddenVolume" If you don't have a ticker, add one now.
// 4. Copy this script (and volume.maki) to your scripts folder.
// 5. If you don't have volume.maki, compile this script.
// 6. Add this line to the group that contains your animated layer
// <script id="animvolume" file="scripts/volume.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip volume.zip (3.3 KB, 1455 views)
frisbeemonkey is offline   Reply With Quote
Old 9th September 2002, 21:25   #20
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Skin demonstrating these scripts

In response to the requests of newer skinners wanting to see a full skin using these scripts, I have updated my MAKI skin to use many of these exact scripts. The XML is commented, noting which parts of the XML are useed by which script. The updated skin is available here . Make sure you get the most recent version, rename it to .zip, open it up and check it out!
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 9th September 2002, 22:47   #21
will
Nullsoft Newbie (Moderator)
 
will's Avatar
 
Join Date: Mar 2001
Location: Sheffield, England
Posts: 5,569
Yeah, that autorepeating volume buttons is a nice thing for beginners.

DO NOT PM ME WITH TECH SUPPORT QUESTIONS
will is offline   Reply With Quote
Old 10th September 2002, 20:59   #22
tweek59
Junior Member
 
Join Date: Mar 2002
Posts: 20
I'm trying to make a skin where i need the drawer script to open on mouse over instead of mouse click. I got the code changed, but when I tried to compile, it gave me an error in std.mi. Can somebody help me out with this?
tweek59 is offline   Reply With Quote
Old 10th September 2002, 22:02   #23
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
You're in luck. The next two scripts coming up are a mute button and a mouseover drawer
Check back tonight or tomorrow sometime,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 11th September 2002, 05:11   #24
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Mute script

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define the following in your XML:
// <togglebutton
// id="Mute"
// x="147" y="125"
// image="player.MuteOff"
// downImage="player.MuteOn"
// activeImage="player.MuteOn"
// tooltip="Mute"
// />
// Change the position(x,y) to the specifics of your button,
// 2. Make sure your ticker is called "SongTicker" and is in the same group as
// "Mute" If you don't have a ticker, add one now.
// 4. Copy this script (and mute.maki) to your scripts folder.
// 5. If you don't have mute.maki, compile this script.
// 6. Add this line to the group that contains your animated layer
// <script id="mute" file="scripts/mute.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip mute.zip (2.2 KB, 1449 views)
frisbeemonkey is offline   Reply With Quote
Old 11th September 2002, 05:50   #25
Lion King
Major Dude
 
Join Date: Jan 2001
Posts: 1,670
thanks for the mute script!
two more ideas:
a playing time counter that shows milliseconds (01:12:45) like in those early alpha versions of winamp3 (iirc)
someone asked me why the songtitledisplay scrolling in the main window of winamp3 differs from wa2, it scrolls forth and back rather than only in one direction - can you change that with maki?
Lion King is offline   Reply With Quote
Old 11th September 2002, 06:07   #26
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Hey Lion King,
No problem about the mute script, I'll be updating the MAKI skin soon so you can see it in action. Just have to finish up commenting this MouseOverDrawer.
There is a script that does something like what you want for the timer, check out the Skinning/Scripting Tips And Tricks sticky. The post is by Spleen and is entitled Sonique2 Timer.
I don't know if you can limit the ticker to scrolling only one direction in MAKI. I am guessing not, but that's only a guess.
Back to commenting,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 11th September 2002, 06:12   #27
tweek59
Junior Member
 
Join Date: Mar 2002
Posts: 20
i'm anxiously awaiting the mouseoverdrawer script. now i'm not gonna be able to go to bed tonight. i'll post a very basic idea of what i've been trying to accomplish (with just the base skin), then all you creative types will hopefully figure out ways to use it too.
tweek59 is offline   Reply With Quote
Old 11th September 2002, 06:16   #28
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
MouseOver Drawer Script

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define a MouseOver drawer group in your XML. (see example below)
// 2. Add your background layer to the group, something like:
// <layer id="MODrawer" image="player.MODrawer" x="0" y="0" sysregion="1"/>
// You can change any of the values but the id and sysregion
// 3. Add a layer to pass info to this script, something like:
// <layer id="MODrawerInfo" x="54" y="151"/>
// Set x and y to where you want your drawer to slide to
// 3. Add any other objects(layers, buttons, sliders, etc) to your group
// 4. Copy this script (and mouseoverdrawer.maki) to your scripts folder.
// 5. If you don't have mouseoverdrawer.maki, compile this script.
// 6. Add this line to the group that you want to be a drawer:
// <script id="mouseoverdrawer" file="scripts/mouseoverdrawer.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************

// EXAMPLE XML
//=============================================================================
//<groupdef id="MouseOverDrawerGroup" w="121" h="33">
//
// <!-- This layer is the background for the drawer, also catches mouse coords for opening/closing-->
// <layer id="MODrawer" image="player.MODrawer" x="0" y="0" sysregion="1" move="0"/>
//
// <!-- This layer passes info to the drawer script, see script for details +22y-->
// <layer id="MODrawerInfo" x="54" y="151"/>
// //add other objects that you want to move with the drawer here
//
// <script id="mouseoverdrawer" file="scripts/mouseoverdrawer.maki"/>
//</groupdef>
//=============================================================================
// ***Don't forget to place your group somewhere in your layout!***
// <group id="DrawerGroup" x="47" y="0"/>

/**
Note: This is not very useful as is. The drawer will close when the mouse
goes over anything you put in the drawer. I put my animated layers
in the MAKI skin by setting them ghost="1", but most things you'll want
to put in the drawer require mouse input. To add mouse-dependent
objects (buttons, sliders, etc) make sure they are not ghosted and then
you will have to add to this script and recompile it.

You'll need to follow these steps for each object you want to add:
-Create a new global variable of whatever type(Button, Slider, etc)
Ex. Global Button SomeButton;
-Get the object from the XML
Ex. SomeButton = MODrawerGrp.findObject("SomeButtonName");
-Define an onEnterArea() for your new object
Ex. SomeButton.onEnterArea() {
MODrawerGrp.setTargetX(EndX);
MODrawerGrp.setTargetY(EndY);
MODrawerGrp.setTargetSpeed(1);
MODrawerGrp.gotoTarget();
}
Doing this for all objects will prevent the drawer from closing prematurely.
In 99% of the cases, you won't need an onLeaveArea for anything you add.
**/
Attached Files
File Type: zip mouseoverdrawer.zip (2.7 KB, 1269 views)
frisbeemonkey is offline   Reply With Quote
Old 11th September 2002, 18:25   #29
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Stop After Current Song Script

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define the following in your XML:
// <togglebutton
// id="StopAfterSong"
// x="147" y="89"
// image="player.StopAfterSongOff"
// downImage="player.StopAfterSongOn"
// activeImage="player.StopAfterSongOn"
// tooltip="StopAfterSong"
// />
// Change the position(x,y) to the specifics of your button,
// 2. Make sure your ticker is called "SongTicker" and is in the same group as
// "StopAfterSong" If you don't have a ticker, add one now.
// 4. Copy this script (and StopAfterSong.maki) to your scripts folder.
// 5. If you don't have StopAfterSong.maki, compile this script.
// 6. Add this line to the group that contains your animated layer
// <script id="StopAfterSong" file="scripts/StopAfterSong.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip stopaftersong.zip (2.3 KB, 1314 views)
frisbeemonkey is offline   Reply With Quote
Old 11th September 2002, 18:26   #30
tweek59
Junior Member
 
Join Date: Mar 2002
Posts: 20
frisbeemonkey...check your pm's
tweek59 is offline   Reply With Quote
Old 11th September 2002, 19:19   #31
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
Quote:
Originally posted by frisbeemonkey
Hey Lion King,
No problem about the mute script, I'll be updating the MAKI skin soon so you can see it in action. Just have to finish up commenting this MouseOverDrawer.
There is a script that does something like what you want for the timer, check out the Skinning/Scripting Tips And Tricks sticky. The post is by Spleen and is entitled Sonique2 Timer.
I don't know if you can limit the ticker to scrolling only one direction in MAKI. I am guessing not, but that's only a guess.
Back to commenting,
~FrisbeeMonkey
actually, about the songticker thingy.. it is possible and has already been made by Gonzotek.
I don't have any link but talk to him about it, he'll know..

-Plague
Plague is offline   Reply With Quote
Old 11th September 2002, 19:31   #32
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
It's possible, but the code is kinda ugly right now, I did it for kicks one afternoon and haven't updated it since. Basically what it does is to get the current songinfo and put it in a string variable and then start a timer where it takes the first character in the string, moves it to the end, then updates the text box. The timer keeps running until the song changes, the player is paused, stopped, or quit (or the skin changes, etc.).

The overall effect is more Winamp2 like, the "scroll" is choppy, but I hate the way Winamp3 scrolls backwards half the time...it's a useless function(unless you happen to read right to left).

I'll update the script for 3.0 final when I get a few minutes, as it was also an easy to use example of putting a script in a standardframe.

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 13th September 2002, 11:52   #33
PJay Tycy
Senior Member
 
Join Date: Jan 2002
Posts: 252
Stop after current song + crossfade

frisbeemonkey : Something to add to your "stop after current song" script. If crossfade is enabled, winamp will stop to early, so when the button is pressed: (1) Check if crossfade is enabled or not, store it in a boolean. (2) Turn off crossfade. When winamp has actually stopped playing the song, you should revert the crossfade-setting to what it was before.

Just something I thought of yesterday evening


PJay
PJay Tycy is offline   Reply With Quote
Old 13th September 2002, 23:00   #34
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Wow, good thought there, PJay. I never use crossfade, so the problem didn't even cross my mind(no pun intended). I'll be away this weekend, but I'll work on it Sun or Mon.
Until then,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 16th September 2002, 22:01   #35
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Stop After Song, now with CrossFade support

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define the following in your XML:
// <togglebutton
// id="StopAfterSong"
// x="147" y="89"
// image="player.StopAfterSongOff"
// downImage="player.StopAfterSongOn"
// activeImage="player.StopAfterSongOn"
// tooltip="StopAfterSong"
// />
// Change the position(x,y) to the specifics of your button,
// 2. Make sure your ticker is called "SongTicker" and is in the same group as
// "StopAfterSong" If you don't have a ticker, add one now. Also, have
// a CrossFade button somewhere in the group or one of it's subgroups. Make
// sure it is a togglebutton, and that it is named "CrossFade".
// 4. Copy this script (and StopAfterSong.maki) to your scripts folder.
// 5. If you don't have StopAfterSong.maki, compile this script.
// 6. Add this line to the group that contains your animated layer
// <script id="StopAfterSong" file="scripts/StopAfterSong.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip stopaftersong.zip (2.5 KB, 1166 views)
frisbeemonkey is offline   Reply With Quote
Old 17th September 2002, 01:20   #36
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Clock Script

//-----------------------------------------------------------------------------
// clock.m
//
// Example of a Clock Script
// Displays the current time in the Timer when not playing.
//
// created by FrisbeeMonkey
//-----------------------------------------------------------------------------

// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define a Timer in your XML, something like:
// <!-- Timer -->
// <Text
// id="Timer"
// display="time"
// x="194" y="10"
// w="70" h="18"
// font="player.timernum"
// align="right"
// shadowcolor="0,0,0"
// shadowx="0" shadowy="1"
// timecolonwidth="7"
// />
// 2. Make sure its id is "Timer".
// 3. Copy this script (and clock.maki) to your scripts folder.
// 4. If you don't have clock.maki, compile this script.
// 5. Add this line to the group that contains your Timer:
// <script id="clock" file="scripts/clock.maki"/>
// 6. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip clock.zip (2.2 KB, 1323 views)
frisbeemonkey is offline   Reply With Quote
Old 17th September 2002, 12:02   #37
proton078
Junior Member
 
Join Date: Sep 2002
Location: Germany
Posts: 7
Send a message via ICQ to proton078
Question Balance

Hi there,
first of all, thank you very much for the maki scripts. I find them very useful because I’m a total looser in scripting. That’s exactly why I’m asking this question. I’m planning to implement a balance function into my skin that should work like the animated volume and the autorepeatvolume buttons. I wonder if you could tell me how to modify the scripts so that they don’t change the volume but the balance.
Thank you...and keep but the great work
proton078 is offline   Reply With Quote
Old 17th September 2002, 19:03   #38
spleen
Senior Member
 
spleen's Avatar
 
Join Date: Feb 2002
Location: Split, Croatia
Posts: 180
Send a message via ICQ to spleen
Re: Balance

Quote:
Originally posted by proton078
Hi there,
first of all, thank you very much for the maki scripts. I find them very useful because I’m a total looser in scripting. That’s exactly why I’m asking this question. I’m planning to implement a balance function into my skin that should work like the animated volume and the autorepeatvolume buttons. I wonder if you could tell me how to modify the scripts so that they don’t change the volume but the balance.
Thank you...and keep but the great work
Map is declared like element:
code:
<bitmap
id="player.balance.map"
file="eq/balance-map.png"
/>




In XML set Balance animated layer like this:
code:
<AnimatedLayer
id="anlBalance"
x="20" y="20"
w="32" h="32"
image="player.balance.knob"
move="0"
/>




In XML set Balance slider like this:
code:
<slider
id="sliBalance"
action="PAN"
x="20" y="20"
w="100" h="10"
thumb="slider.thumb.norm"
downThumb="slider.thumb.down"
/>




Compile this (it should work, haven't tested this):
code:
#include "../../../lib/std.mi"

Function updateBalance(int v);

Global AnimatedLayer anlBalance;
Global Map mapBalance;
Global Slider sliBalance;
Global int BalChanging=0;

System.onScriptLoaded() {
// get anlBalance, mapBalance and sliBalance from XML...

mapBalance = new Map;
mapBalance.loadMap("player.balance.map");
sliBalance.hide(); // hide slider

updateBalance(sliBalance.getPosition()+1);
}

System.onScriptUnloading() {
delete mapBalance;
}

anlBalance.onLeftButtonDown(int x, int y) {
BalChanging=1;
x = x - anlBalance.getLeft();
y = y - anlBalance.getTop();
int v = mapBalance.getValue(x,y);
updateBalance(v);
}

anlBalance.onMouseMove(int x, int y) {
if (BalChanging) {
x = x - anlBalance.getLeft();
y = y - anlBalance.getTop();
if (mapBalance.inRegion(x,y)) {
int v = mapBalance.getValue(x,y);
updateBalance(v);
}
}
}

anlBalance.onLeftButtonUp(int x, int y) {
if (BalChanging) {
x = x - anlBalance.getLeft();
y = y - anlBalance.getTop();
if (mapBalance.inRegion(x,y)) {
int v = mapBalance.getValue(x,y);
updateBalance(v);
}
BalChanging=0;
}
}

updateBalance(int v) {
int k = v/255 * 16;
anlBalance.gotoFrame(k);
sliBalance.setPosition(v);
}

spleen is offline   Reply With Quote
Old 17th September 2002, 21:57   #39
proton078
Junior Member
 
Join Date: Sep 2002
Location: Germany
Posts: 7
Send a message via ICQ to proton078
doesn't work for me

Thanks for the help but I still have a problem with the balance. It isn’t working the way the volume does (volume.maki, posted earlier), I’ve tried to change the volume.m to suit my needs, but I can’t find a function that is similar to System.GetVolume and setVolume for balance. Is there a function?
proton078 is offline   Reply With Quote
Old 18th September 2002, 01:10   #40
spleen
Senior Member
 
spleen's Avatar
 
Join Date: Feb 2002
Location: Split, Croatia
Posts: 180
Send a message via ICQ to spleen
Re: doesn't work for me

Quote:
Originally posted by proton078
Thanks for the help but I still have a problem with the balance. It isn’t working the way the volume does (volume.maki, posted earlier), I’ve tried to change the volume.m to suit my needs, but I can’t find a function that is similar to System.GetVolume and setVolume for balance. Is there a function?
Sorry, I wasn't clear enough.

Intro:
Functions "getBalance()" and "setBalance()" don't exist yet.
So, I've used small trick. Put one slider, that has action="PAN"
parameter, in your EQ or any window. That's balance. I know that's a
bit strange, but Nullsoft uses that.
I've linked actions on animated layer (anlBalance) with that slider
so when you "rorate" anlBalance, you automaticaly change balance.

About my script:
When Wa3 loads the script it will hide that slider cause it will
appear in the skin and it shouldn't. You use that slider's position
for getting balance value. 0 is far left and 255 is far right. 128 is
center position.
When you click that animated layer it registers mouse actions and
sets animated layer frame accordingly. Also, as you set anlBalance,
you set sliBalance (balance slider) position which then sets balance.

I think this was clear enough...
spleen 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