Go Back   Winamp Forums > Skinning and Design > Modern Skins

Reply
Thread Tools Search this Thread Display Modes
Old 10th March 2008, 18:14   #1
fuyou
Junior Member
 
Join Date: Feb 2008
Posts: 26
maki help

//here is my maki please read the bottom

#include "std.mi"

Global layer idummy, tempdummy; //idummy for foreground; tempdummy for temp holder
Global layer partone, parttwo, partthree, partfour; //parts for layers holder - in order

Global togglebutton painloop; // loopbutton
Global togglebutton onepain, twopain, threepain, fourpain; //buttons to activate layers - in order

Global Group allmypains;

System.onScriptLoaded(){

allmypains = getScriptGroup();

idummy=allmypains.findObject("inforeground"); //change to foreground value

partone=allmypains.findObject("bgone"); //get all layer values -in order
parttwo=allmypains.findObject("bgtwo");
partthree=allmypains.findObject("bgthree");
partfour=allmypains.findObject("bgfour");

onepain=allmypains.findObject("changebuttonone"); //get all pain buttons- in order
twopain=allmypains.findObject("changebuttontwo");
threepain=allmypains.findObject("changebuttonthree");
fourpain=allmypains.findObject("changebuttonfour");

painloop=allmypains.findObject("bgloopbutton"); //get loop button

idummy = partone; //set first layer to foreground
tempdummy = idummy; //tempdummy get value since idummy will change value
}
//----------------------------------------------------------------
onepain.onLeftButtonUp(int x, int y) { // buttons1 onclick
if (idummy != partone){
idummy = partone;
tempdummy = partone;
}
}
onepain.onEnterArea(int x, int y){
if (idummy != partone){
idummy = partone;
}
}
onepain.onLeaveArea(int x, int y){
if (idummy != partone){
idummy = tempdummy;
}
}
//------------
//I wanted to know how to set(change the value of) the inforeground layer
//I you don't understand what I am talking about look at the image below
//bihen.deviantart.com/art/winamp-77116028

//I am trying to loop the layers too is there anyway? and how. thanks
fuyou is offline   Reply With Quote
Old 10th March 2008, 19:42   #2
pjn123
Major Dude
 
pjn123's Avatar
 
Join Date: Jan 2006
Location: /\/¯¯¯¯¯\/\ , South-Africa
Posts: 1,026
Cant see what you want to do but I can tell you that to change a layer or a image in a button you do this:

PHP Code:
mylayer.setXmlParam("image""bitmapid");
mybutton.setXmlParam("hoverimage""bitmapid"); 
If you do this:
PHP Code:
idummy=allmypains.findObject("inforeground");
partone=allmypains.findObject("bgone");
idummy partone//set first layer to foreground 
You basically just did this:
PHP Code:
idummy=allmypains.findObject("bgone"); 
The button wont change to the other button. idummy & partone just points to your xml button. Like a address where to find them.

Hope this helps

ClassicPro© v2.01 : This plugin allows you to use cPro skins in Winamp. ClassicPro skins are all SUI skins and loads very quickly. ClassicPro skins is even easier to skin than Winamp Classic skins. A new layout have been added since version 2.
Download ClassicPro© ==== cPro Skins ==== ClassicPro© Homepage ==== SC Forums
pjn123 is offline   Reply With Quote
Old 12th March 2008, 13:44   #3
fuyou
Junior Member
 
Join Date: Feb 2008
Posts: 26
actually

i am trying to use the buttons to set layers 1 or 2 or 3 or 4 to the inforeground layer

idummy = partone
is where I am doingwrong. I want the inforeground layer to change to the link in layer bgone


by the way is there a way to animate the layers using buttons to activate it, if they are placed in the same image file. i saw it in the post called MAKI Cheats that it's possible but I don't uderstand it.
fuyou is offline   Reply With Quote
Old 12th March 2008, 16:17   #4
pjn123
Major Dude
 
pjn123's Avatar
 
Join Date: Jan 2006
Location: /\/¯¯¯¯¯\/\ , South-Africa
Posts: 1,026
Here is what I'll do if I understand you right:

Xml:
PHP Code:
<button id="mybutton" x="0" y="0" w="100" h="100" rectrgn="1"/>
<
layer id="mylayer" x="0" y="0" w="100" h="100" ghost="1"/> 
Script:
PHP Code:
mybutton.onEnterArea(int xint y){ 
    
mylayer.setXmlParam("image""mybitmapelement.1");
}
mybutton.onLeaveArea(int xint y){
    
mylayer.setXmlParam("image""mybitmapelement.2");

Only example


As for the animation:
PHP Code:
<AnimatedLayer
    id
="eq.mode.ani.0"
    
x="7" y="38" w="17" h="8" 
    
image="eq.mode.ani.0"
    
autoplay="0" autoreplay="1"
/> 
Look in the SCWiki for the full info on the above object:
http://wiki.skinconsortium.com/index...tedlayer.2F.3E
But had a quick look at the bitmap used there... You only need one bitmap... if the AnimatedLayer is 50pixels high... then your image you use there should also be: no. frames x 50... Like this:
..\Winamp\Skins\Big Bento\window\beatvis.png

And in std.mi you'll find lots of functions for AnimatedLayer... just search for it

ClassicPro© v2.01 : This plugin allows you to use cPro skins in Winamp. ClassicPro skins are all SUI skins and loads very quickly. ClassicPro skins is even easier to skin than Winamp Classic skins. A new layout have been added since version 2.
Download ClassicPro© ==== cPro Skins ==== ClassicPro© Homepage ==== SC Forums
pjn123 is offline   Reply With Quote
Old 14th March 2008, 13:20   #5
fuyou
Junior Member
 
Join Date: Feb 2008
Posts: 26
PHP Code:
        painloop=allmypains.findObject("bgloopbutton");    //get loop button

    
idummy.setXmlParam("image",  "player.background.one" );  //set first layer to foreground
    //tempdummy = partone;   //tempdummy get value since idummy will change value

the skin works uptill here but the rest doesn't work but compiles ok. Is there a way to get the layerimage to show on top of all other layers for oh hover?

PHP Code:
//-----------------------------------------------------
onepain.onLeftButtonUp(int xint y){         // buttons1 onclick
    
idummy.setXmlParam("image""player.background.one" ); 
}
onepain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.one" ); 
}
onepain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 
}
//-----------------------------------------------------
twopain.onLeftButtonUp(int xint y){         // buttons2 onclick
    
idummy.setXmlParam("image""player.background.two" ); 
}
twopain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.two" ); 
}
twopain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 
}
//-----------------------------------------------------
threepain.onLeftButtonUp(int xint y){         // buttons3 onclick
    
idummy.setXmlParam("image""player.background.three" ); 
}
threepain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.three" ); 
}
threepain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 
}
//-----------------------------------------------------
fourpain.onLeftButtonUp(int xint y){         // buttons4 onclick
    
idummy.setXmlParam("image""player.background.four" ); 
}
fourpain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.four" ); 
}
fourpain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 

fuyou is offline   Reply With Quote
Old 14th March 2008, 13:30   #6
fuyou
Junior Member
 
Join Date: Feb 2008
Posts: 26
PHP Code:
        painloop=allmypains.findObject("bgloopbutton");    //get loop button

    
idummy.setXmlParam("image",  "player.background.one" );  //set first layer to foreground
    //tempdummy = partone;   //tempdummy get value since idummy will change value

the skin works up till here but the rest doesn't work but compiles ok. Is there a way to get the layerimage to show on top of all other layers for on mouse hover?

PHP Code:
//-----------------------------------------------------
onepain.onLeftButtonUp(int xint y){         // buttons1 onclick
    
idummy.setXmlParam("image""player.background.one" ); 
}
onepain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.one" ); 
}
onepain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 
}
//-----------------------------------------------------
twopain.onLeftButtonUp(int xint y){         // buttons2 onclick
    
idummy.setXmlParam("image""player.background.two" ); 
}
twopain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.two" ); 
}
twopain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 
}
//-----------------------------------------------------
threepain.onLeftButtonUp(int xint y){         // buttons3 onclick
    
idummy.setXmlParam("image""player.background.three" ); 
}
threepain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.three" ); 
}
threepain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 
}
//-----------------------------------------------------
fourpain.onLeftButtonUp(int xint y){         // buttons4 onclick
    
idummy.setXmlParam("image""player.background.four" ); 
}
fourpain.onEnterArea(){             
    
idummy.setXmlParam("image""player.background.four" ); 
}
fourpain.onLeaveArea(){
    
idummy.setXmlParam("image""player.background.one" ); 

fuyou is offline   Reply With Quote
Old 14th March 2008, 13:59   #7
SLoB
Major Dude
 
SLoB's Avatar
 
Join Date: Jul 2003
Location: UK
Posts: 1,316
hmm, thats just nasty

why don't you try using a xui button, that way you only need to do one lot of code for x amount of buttons
SLoB is offline   Reply With Quote
Old 14th March 2008, 14:55   #8
pjn123
Major Dude
 
pjn123's Avatar
 
Join Date: Jan 2006
Location: /\/¯¯¯¯¯\/\ , South-Africa
Posts: 1,026
Attach the skin... will be easier to take a look then

ClassicPro© v2.01 : This plugin allows you to use cPro skins in Winamp. ClassicPro skins are all SUI skins and loads very quickly. ClassicPro skins is even easier to skin than Winamp Classic skins. A new layout have been added since version 2.
Download ClassicPro© ==== cPro Skins ==== ClassicPro© Homepage ==== SC Forums
pjn123 is offline   Reply With Quote
Old 15th March 2008, 15:21   #9
fuyou
Junior Member
 
Join Date: Feb 2008
Posts: 26
hmm, thats just nasty

why don't you try using a xui button, that way you only need to do one lot of code for x amount of buttons



I wish I know how to do it but I am a beginner at this. i'll see what can I do with the attachnment of the skin. I can't go online often.
fuyou is offline   Reply With Quote
Old 15th March 2008, 15:41   #10
SLoB
Major Dude
 
SLoB's Avatar
 
Join Date: Jul 2003
Location: UK
Posts: 1,316
check some of the recent sc skins, some of them have xui buttons where u can nab the code from
u have 1 xui button, do/have all the maki code for it and then just put an instance in of it in the xml file as needed, once u get your head round it, they are simple objects but powerful and will help to reduce code and maintenance
SLoB is offline   Reply With Quote
Old 17th March 2008, 17:41   #11
fuyou
Junior Member
 
Join Date: Feb 2008
Posts: 26
here's the link just click on download the zip will popup

http://bihen.deviantart.com/art/winamp-77116028

please take a look at the scripts/m maki files first I don't maybe it's the skins I dl from the net but it seems to make winamp disfunctional.

btw. I searched for xui but nothing helpful came up.
fuyou is offline   Reply With Quote
Old 20th March 2008, 09:08   #12
pjn123
Major Dude
 
pjn123's Avatar
 
Join Date: Jan 2006
Location: /\/¯¯¯¯¯\/\ , South-Africa
Posts: 1,026
Ok fuyou

Did this:
- Started the maki from scratch
- Used only one layer
- Moved the script out of the button group to the top group (player.xml)
-added the loop & change on hover

Tell me if this is what you want. Just replace all the stuff with this stuff in the attachment

Think you will understand maki a little better after you look at the new code

EDIT: Forgot to tell you what your MAIN problem was:
- The script was placed in the buttons group and not in the top group... this meens that your script found the buttons but couldn't find the layers. I moved the script to player.xml so that it can 'see' everything.
Attached Files
File Type: zip newstuff.zip (14.7 KB, 114 views)

ClassicPro© v2.01 : This plugin allows you to use cPro skins in Winamp. ClassicPro skins are all SUI skins and loads very quickly. ClassicPro skins is even easier to skin than Winamp Classic skins. A new layout have been added since version 2.
Download ClassicPro© ==== cPro Skins ==== ClassicPro© Homepage ==== SC Forums
pjn123 is offline   Reply With Quote
Old 20th March 2008, 19:04   #13
fuyou
Junior Member
 
Join Date: Feb 2008
Posts: 26
A big thanks for helping. I'll try it.
fuyou is offline   Reply With Quote
Reply
Go Back   Winamp 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