Old 16th November 2002, 23:01   #161
Hollow
Major Dude
 
Hollow's Avatar
 
Join Date: Oct 2001
Location: Baker Lab, Ithaca NY
Posts: 1,128
Send a message via AIM to Hollow
I did this as a script a long time ago. Its currently broken I'll fix it up and post it tomorrow (not a promise though.)

The moon is made of cheese.
Oh for some tasty moon cheese.
www.redtetrahedron.org
Hollow is offline   Reply With Quote
Old 18th November 2002, 04:18   #162
DirtyLowMoFo
Member
 
Join Date: Aug 2002
Posts: 58
chenzen....
this might help you, extract it to your Winamp3/Scripts directory & load it from Preferences..Add-Ons/Skin Mods
Attached Files
File Type: zip bm-demo.zip (17.2 KB, 894 views)
DirtyLowMoFo is offline   Reply With Quote
Old 18th November 2002, 11:40   #163
chenzen
Junior Member
 
chenzen's Avatar
 
Join Date: Nov 2002
Location: outer space.
Posts: 19
Send a message via ICQ to chenzen
thanx DirtyLowMoFo, this little piece of code was just what ive been looking for and couldnt figure out for myself. vu-meter is working.

btw, if you adjust the top- and bottom-values in the region-map from 255 to about 253 and anything above 0 then the bargraph hits the red region and shows nothing if there is no signal. i think that looks much nicer. (i let mine start at 20..)

this timer-stuff has a really heavy CPU-usage. on my 400Mhz P2 musicmachine it rose from about 10% to sometimes more than 60%...
chenzen is offline   Reply With Quote
Old 18th November 2002, 14:39   #164
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
Talking Volume Slider using regions

//--------------------------------------------------------------------
// regionvolume.m
//
// Example of an volume slider using regions
// based on the Animated Volume Script created by RhinoTrip (i think)
// and FrisbeeMonkey's volume.m.
// Special thanks to DirtyLowMoFo's Beat Meter for showing me how to use regions right.
//
// created by Da_Pipe
//--------------------------------------------------------------------

// USING THIS SCRIPT:
//********************************************************************
// 1. Define the following in your XML:
// <layer id="Volume" image="player.layer.volume" x="?" y="?" w="?" h="?" move="0"/>

// Change the position(x,y) and size(w,h) of "Volume" to the specifics
// of your layer.
// 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
// 3. Make sure your ticker is called "SongTicker" and is in the same group as
// "Volume". 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="regionvolume" file="scripts/regionvolume.maki"/>
// 7. Refresh your skin(F5) and try it out.
//********************************************************************
Attached Files
File Type: zip regionvolume.zip (3.2 KB, 862 views)
Da_Pipe is offline   Reply With Quote
Old 18th November 2002, 15:08   #165
Hollow
Major Dude
 
Hollow's Avatar
 
Join Date: Oct 2001
Location: Baker Lab, Ithaca NY
Posts: 1,128
Send a message via AIM to Hollow
Try adjusting the delay of the timer, the higher the number, the less cpu usage.

The moon is made of cheese.
Oh for some tasty moon cheese.
www.redtetrahedron.org
Hollow is offline   Reply With Quote
Old 18th November 2002, 15:42   #166
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
ok fixed a bug with the Songticker, set the timer a little higher and got response to be a little better.
Attached Files
File Type: zip regionvolume.zip (3.3 KB, 1164 views)

Blah!
Da_Pipe is offline   Reply With Quote
Old 18th November 2002, 17:26   #167
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
Seek Slider using regions

//-----------------------------------------------------------------------------
// regionseek.m
//
// Example of an Seekbar using regions
// Based on the Animated Seek Script created by RhinoTrip and modified by
// FrisbeeMonkey.
// Special thanks to DirtyLowMoFo's Beat Meter for showing me how to use
// regions right.
//
// modified by Da_Pipe
//-----------------------------------------------------------------------------
// USING THIS SCRIPT:
//*****************************************************************************
// 1. Define the following in your XML:
// <layer id="Seek" image="player.layer.seek" x="?" y="?" w="?" h="?" move="0"/>
//
// Change the position(x,y) and size(w,h) of "Seek" to the specifics
// of your layer.
// 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
// "Seek". 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="regionseek" file="scripts/regionseek.maki"/>
// 7. Refresh your skin(F5) and try it out.
//*****************************************************************************
Attached Files
File Type: zip regionseek.zip (3.2 KB, 854 views)

Blah!
Da_Pipe is offline   Reply With Quote
Old 19th November 2002, 17:59   #168
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
Talking Seekbar using regions

there was a problem with the script when it was first loaded, region wasn't applied correctly according to actual song position. fixed.
Attached Files
File Type: zip regionseek.zip (3.3 KB, 828 views)

Blah!
Da_Pipe is offline   Reply With Quote
Old 21st November 2002, 16:38   #169
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Hello everyone
I have started trying to learn maki, and have made a script but it will not compile. I know i am doing something wrong but not what.
Can someone please point me in the right direction?
Heres the code:
code:

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

Global Group configure; //Define your elements
Global slider Opacityslider; //Define your elements
Global Layer orb; //Define your elements
Global Timer timerGlassOpacityCheck;

System.onScriptLoaded()
{
orb = System.getContainer("main").getLayout("normal").getObject("player.lcd.orb"); // Gets the actual image set for opacity

Opacityslider = System.getContainer("Configure").getLayout("normal").getObject("config.opacslider"); //Gets the slider that will modify opacity.
}

timerGlassOpacityCheck = new Timer; //These 3 lines check for opacity
timerGlassOpacityCheck.setDelay(1000);
timerGlassOpacityCheck.start();
}

timerGlassOpacityCheck.onTimer() {
orb.setAlpha; //Command to reset alpha.
}




Thanx,
HH
hammerhead is offline   Reply With Quote
Old 21st November 2002, 16:58   #170
Da_Pipe
Senior Member
 
Join Date: Sep 2002
Location: Home
Posts: 317
Send a message via ICQ to Da_Pipe Send a message via Yahoo to Da_Pipe
had an extra bracket in System.onScriptLoaded(), orb.setAlpha; should be orb.setAlpha(x); where x is an int.
Attached Files
File Type: m text.m (803 Bytes, 809 views)

Blah!
Da_Pipe is offline   Reply With Quote
Old 21st November 2002, 18:13   #171
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Thanks Da_Pipe, but i am still having problems.
I have made a skin with the opacity slider. There are no errors, the image i want for opacity is there and goes off after abt a second. then the slider cannot regain its alpha!
Please help me.
Heres the skin
Attached Files
File Type: wal alpha.wal (4.9 KB, 812 views)
hammerhead is offline   Reply With Quote
Old 21st November 2002, 18:55   #172
DirtyLowMoFo
Member
 
Join Date: Aug 2002
Posts: 58
hammerhead....
change
timerGlassOpacityCheck.onTimer() {
orb.setAlpha(x); //Command to reset alpha.
}

to
timerGlassOpacityCheck.onTimer() {
int x = Opacityslider.getPosition();
orb.setAlpha(x); //Command to reset alpha.
}
or
timerGlassOpacityCheck.onTimer() {
orb.setAlpha(Opacityslider.getPosition());
}
DirtyLowMoFo is offline   Reply With Quote
Old 21st November 2002, 19:52   #173
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Ok thanks DirtyLowMoFo and Da_Pipe.
I have put up the script if anyone wants to use it.
I cant believe it I coded my first .m and it works properly!!
CELEBRATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

--------------------------------------------------------------------
Coded By HammerHead aka Kabir Chanrai
Set right by Da_Pipe and DirtyLowMoFo
Feel free to use this in your skin.

Define your group, layout, and image id that will be opacified in the script.
Define your group, layout, and slider id that will opacify in the script.

Include this in your skin somewhere:

<script id="alpha" file="scripts/alphaeditor"/>
--------------------------------------------------------------------
Attached Files
File Type: zip alphaeditor.zip (1.6 KB, 993 views)
hammerhead is offline   Reply With Quote
Old 22nd November 2002, 22:45   #174
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Ok I have tried to make another script (probably totally wrong maki wording )
It is supposed to stop/start songticker scrolling.
Can anyone please correct my script?

code:

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

Global Text Songticker;
Global Button buttonCheckBox;

Songticker = System.getContainer("main").getLayout("normal").getObject("songticker");
buttonCheckBox = System.getContainer("config").getLayout("normal").getObject("songticker.scroll.toggle");

buttonCheckBox.OnLeftClick()
{
If (buttonCheckBox) {
SongTicker.stopScroll
} else {
If (buttonCheckBox) {
SongTicker.startScroll
}
}



Thanks,
HH
hammerhead is offline   Reply With Quote
Old 22nd November 2002, 23:42   #175
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Hey Hammerhead,
You can control the songticker's scrolling merely by changing its XML parameters. You can use:
Songticker.setXMLParam("Ticker","0");
to turn it off, and:
Songticker.setXMLParam("Ticker","1");
to turn it back on.
Not sure what you want to do with that if/else you have going there, they are both the same? Perhaps you'd want to have a boolean that keeps track of it's on/off state?
Hope this helps,
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 23rd November 2002, 07:59   #176
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
I am actually trying to get it into a button which will switch between scrolling or not. Sorry I explained wrong before. Can anyone help me?
HH
hammerhead is offline   Reply With Quote
Old 23rd November 2002, 08:09   #177
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
You explained it fine. What I was suggesting was for your button.

buttonCheckBox.OnLeftClick()
{
if (ScrollOn) {
//if scrolling, stop
Songticker.setXMLParam("Ticker","0");
ScrollOn = 0;
} else {
//if stopped, turn on scroll
SongTicker.setXMLParam("Ticker","1");
ScrollOn = 1;
}
}

Where ScrollOn is a boolean that you declare globally.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 23rd November 2002, 08:46   #178
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Ok frisbeemonkey I have done everything you told me to, but there is an error somewhere in the script (it will not compile). Can you please correct it? Thanx, HH

code:

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

Global Text Songticker;
Global Boolean buttonCheckBox;

Songticker = System.getContainer("main").getLayout("normal").getObject("songticker");
buttonCheckBox = System.getContainer("config").getLayout("normal").getObject("songticker.scroll.toggle");

buttonCheckBox.OnLeftClick()
{
if (ScrollOn) {
//if scrolling, stop
Songticker.setXMLParam("Ticker","0");
ScrollOn = 0;
} else {
//if stopped, turn on scroll
SongTicker.setXMLParam("Ticker","1");
ScrollOn = 1;
}
}


hammerhead is offline   Reply With Quote
Old 23rd November 2002, 19:36   #179
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Well, you're getting closer. You should make ScrollOn a Boolean, yet leave buttonCheckbox as a Button.
Also, your two System.getContainer lines should be inside onScriptLoaded(), not just floating out in the nether regions of your script. Also inside onScriptLoaded, you should set ScrollOn to whatever your skin defaults to(you could use getXMLParam or just set it to 1 or 0)
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 23rd November 2002, 20:15   #180
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Frisbeemonkey, I (think) I have done everything you told me to in the maki, but it still does not seem to be compiling. Please Help!
code:

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

Global Text Songticker;
Global Button buttonCheckBox;
Global Boolean ScrollOn;

System.onScriptLoaded()
{
Songticker = System.getContainer("main").getLayout("normal").getObject("songticker");
buttonCheckBox = System.getContainer("config").getLayout("normal").getObject("songticker.scroll.toggle");
ScrollOn = System.getContainer("main").getLayout("normal").getObject("songticker").getXMLparam("ticker");
}
buttonCheckBox.OnLeftClick()
{
if (ScrollOn) {
//if scrolling, stop
Songticker.setXMLParam("Ticker","0");
ScrollOn = 0;
} else {
//if stopped, turn on scroll
SongTicker.setXMLParam("Ticker","1");
ScrollOn = 1;
}
}


Thanx,
HH
hammerhead is offline   Reply With Quote
Old 23rd November 2002, 20:51   #181
chenzen
Junior Member
 
chenzen's Avatar
 
Join Date: Nov 2002
Location: outer space.
Posts: 19
Send a message via ICQ to chenzen
i just finished my VU-meter, so here is it to you.

some features i added to the basic code provided by [DirtyLowMoFo]:

-> i put 3 layers of the vu on top of each other (each with different graphics, of course) which are loaded with the last and forelast values of the vu. so the display smoothes up. this consumes quite some cpu-power, but who cares, Mhz are getting cheaper by the day.

-> there is a togglebutton, so if this thing consumes too much CPU (sometimes we've got other things to do than watch a VU going up and down..) - switch it off.

-> and something simple: the vu listens to the systemsstatus. no song running, no timer running. no cpu usage.

maybe i add something like a "going-down-slowly-on-stop"-function later. that would look really professional.

i have one question left for now: when you start a song the VU makes a jump to full, then pauses for about half a second, and then starts to work. the same thing happens when you press resume some time after pause. if the pause-resume gap is quite short, the vu starts immediatly. does anyone know where this comes from?

oh, by the way: the zip is a runnable version, so unzip to the \winamp3\scripts\ directory, go to the [preferences]-menu, choose [add-ons/skin-mods] and add the script.xml file from my zip.
you can then right-click on your skin and open the VU-window.

chenzen.
Attached Files
File Type: zip toggle-vu_v1.zip (7.8 KB, 891 views)
chenzen is offline   Reply With Quote
Old 23rd November 2002, 20:54   #182
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Almost there. You want to initialize ScrollOn using this line though:
ScrollOn = StringToInteger(Songticker.getXMLParam("Ticker"));
This takes the value of Ticker that you set in your XML, converts it to an integer, which Winamp can then convert to a boolean on its own.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 23rd November 2002, 21:02   #183
DirtyLowMoFo
Member
 
Join Date: Aug 2002
Posts: 58
<edit> removed reply cause FrisbeeMonkey had Allready answered</edit>
DirtyLowMoFo is offline   Reply With Quote
Old 23rd November 2002, 21:58   #184
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Thanks frisbeemonkey, ur a maki god.
hammerhead is offline   Reply With Quote
Old 24th November 2002, 09:59   #185
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Frisbeemonkey, I still seem to be having problems with the script. It compiles fine but when loaded it gives the guru meditation error.
Heres my code and xml:

Configure window XML
[XML]

<button id="songticker.scroll.toggle" image="player.mini.prev" x="28" y="342"/>

<script id="songtickerstopscroll" file="scripts/songtickerstopscroll.maki"/>

[/XML]

Main Window XML
[XML]

<text
id="songticker"
display="songname"
Ticker="1"
x="150" y="78"
w="184" h="24"
font="otherfont" fontsize="16" antialias="1" align="left" alpha="100" color="0,0,0"
timecolonwidth="7"
/>

[/XML]

Script Code:
code:


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

Global Text Songticker;
Global Button buttonCheckBox;
Global Boolean ScrollOn;

System.onScriptLoaded()
{
Songticker = System.getContainer("main").getLayout("normal").getObject("songticker");
buttonCheckBox = System.getContainer("config").getLayout("normal").getObject("songticker.scroll.toggle");
ScrollOn = StringToInteger(Songticker.getXMLParam("Ticker"));
}
buttonCheckBox.OnLeftClick()
{
if (ScrollOn) {
//if scrolling, stop
Songticker.setXMLParam("Ticker","0");
ScrollOn = 0;
} else {
//if stopped, turn on scroll
SongTicker.setXMLParam("Ticker","1");
ScrollOn = 1;
}
}



Can you help please?
hammerhead is offline   Reply With Quote
Old 25th November 2002, 04:57   #186
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
Move the script inclusion outside your configure window container, preferably in a scripts.xml that you include in skin.xml after all your other files. If you don't already have a scripts.xml you'd add this line towards the bottom of skin.xml:
<include file="xml/scripts.xml"/>
then create a new file called scripts.xml and add this to it:
<scripts>
<script id="songtickerstopscroll" file="scripts/songtickerstopscroll.maki"/>
</scripts>
That should get rid of your guru mediation. If not, doublecheck that you spelled everything right in you getContainer/Layout/Object functions.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 25th November 2002, 16:31   #187
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Hmm.. its still not working and I have checked everything.
Also what happens is an 'assertion failed' window comes up, and so winamp closes. I think im just gonna put the skin up here.
can you please correct it?

Size: 477KB
Download
Remember to side click then press 'Save Target As'

Bear in mind that the button to stop the songtickerscrolling is a cbutton that i used cos I couldnt be bothered to make a seperate button yet, and that the titlebar is not finished yet. There are some other bad things like that in the skin but check it out.
Thanks, HH
BTW it will produce a guru meditation error because of the Songtickerscript when you open it.
hammerhead is offline   Reply With Quote
Old 25th November 2002, 17:28   #188
DirtyLowMoFo
Member
 
Join Date: Aug 2002
Posts: 58
hammerhead

change your .onScriptLoaded() to this

System.onScriptLoaded()
{
group main = System.getContainer("main").getLayout("normal").getObject("player.normal.playbuttons");
Songticker = main.getObject("songticker");

buttonCheckBox = System.getContainer("configure").getLayout("normal").findObject("songticker.scroll.toggle");
ScrollOn = StringToInteger(Songticker.getXMLParam("Ticker"));
}
DirtyLowMoFo is offline   Reply With Quote
Old 25th November 2002, 17:43   #189
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Quote:
Originally posted by DirtyLowMoFo
hammerhead

change your .onScriptLoaded() to this

System.onScriptLoaded()
{
group main = System.getContainer("main").getLayout("normal").getObject("player.normal.playbuttons");
Songticker = main.getObject("songticker");

buttonCheckBox = System.getContainer("configure").getLayout("normal").findObject("songticker.scroll.toggle");
ScrollOn = StringToInteger(Songticker.getXMLParam("Ticker"));
}
DirtyLowMoFo, have you tried this yourself with the skin? cos when I tried it it didnt make a guru med, but did nothing.
hammerhead is offline   Reply With Quote
Old 25th November 2002, 17:57   #190
DirtyLowMoFo
Member
 
Join Date: Aug 2002
Posts: 58
hammerhead

I have it running on my desktop as I type this & clicking the button stops the scrolling..Strange it not working for you
Did you replace all of onScriptLoaded() with what I put? because there was an error with the button part aswell.
DirtyLowMoFo is offline   Reply With Quote
Old 25th November 2002, 18:11   #191
chenzen
Junior Member
 
chenzen's Avatar
 
Join Date: Nov 2002
Location: outer space.
Posts: 19
Send a message via ICQ to chenzen
hi hammerhead & co.

maybe you should cross-check your winamp-builds. because i had some strange script-behavior between the official #488 and the #491 from the developers-section. seems like the #491 has had some nice bugfixes..
chenzen is offline   Reply With Quote
Old 25th November 2002, 19:09   #192
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
I downloaded v491, but still it doesnt work.
hammerhead is offline   Reply With Quote
Old 25th November 2002, 19:45   #193
DirtyLowMoFo
Member
 
Join Date: Aug 2002
Posts: 58
hammerhead
I'm attaching the script I have working.
BTW it works on build 488 & 491 but on 491 when closing Winamp it causes Invalid Page Fault (maybe just my POS pc)
Attached Files
File Type: zip script.zip (1.5 KB, 835 views)
DirtyLowMoFo is offline   Reply With Quote
Old 26th November 2002, 08:51   #194
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Hello again :)

Here goes another stupid question,I have the same issue with the different WA3 builds,my problem is the following, i have coded my skin using the 490 build,everything worked fine,but to get sure that WA3 official release users get the same effect i have tried to load my skin with the 488 build,and there it was a big BUG saying : "OOPS a Component is missing",my skin has loaded but the Script for the Visanimation wasn`t working anymore.
The skin or better the vis script works fine with 490 and 491 but not with 488,i wanted to get sure if this is a general WA3 488 Bug or if i can do something that the script also works under 488.

So here`s the Code of a simple Png-changer:
______________________________________________________________________


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

Global Button myButton;
Global int mode;
Global AnimatedLayer animation;

/*

WILDCORE 1K1 WS

The fuction to change the "movie " just clicking the AnimatedLayer is working.

To the same function for the button, uncomment the line

myButton = ContentGrp.getObject("Button_id");

("Button_id" is the button id of your button that will execute the function.)

and the function "myButton.onLeftClick()"

So, recompile this file.

*/

System.onScriptLoaded() {
Group ContentGrp = getScriptGroup();
animation = ContentGrp.getObject("visanimation");
// myButton = ContentGrp.getObject("Button_id");
mode = 1;
}

// you can change to another "movie" by whether clicking the Animated Layer
animation.onLeftButtonDown(int x, int y){
mode++;
if (mode == 7) mode = 1;
if (mode == 1) animation.setXMLParam("image", "visanimation");
if (mode == 2) animation.setXMLParam("image", "visanimation2");
if (mode == 3) animation.setXMLParam("image", "visanimation3");
if (mode == 4) animation.setXMLParam("image", "visanimation4");
if (mode == 5) animation.setXMLParam("image", "visanimation5");
if (mode == 6) animation.setXMLParam("image", "visanimation6");
}

/*
// you can change to another "movie" by whether clicking the button
myButton.onLeftClick() {
mode++;
if (mode == 7) mode = 1;
if (mode == 1) animation.setXMLParam("image", "visanimation");
if (mode == 2) animation.setXMLParam("image", "visanimation2");
if (mode == 3) animation.setXMLParam("image", "visanimation3");
if (mode == 4) animation.setXMLParam("image", "visanimation4");
if (mode == 5) animation.setXMLParam("image", "visanimation5");
if (mode == 6) animation.setXMLParam("image", "visanimation6");
}
*/
______________________________________________________________________

Thnx in advance for any help
WILDCORE 1K1WS is offline   Reply With Quote
Old 26th November 2002, 09:08   #195
frisbeemonkey
Major Dude
 
frisbeemonkey's Avatar
 
Join Date: Jun 2002
Posts: 851
I forget who suggested this in another thread, but I think if you compile your scripts using the mc.exe that comes with #488, it should work for both 488 and 490/1 users.
~FrisbeeMonkey
frisbeemonkey is offline   Reply With Quote
Old 26th November 2002, 09:18   #196
WILDCORE 1K1WS
Junior Member
 
WILDCORE 1K1WS's Avatar
 
Join Date: Sep 2002
Location: Germany
Posts: 35
Talking

Interesting aspect,D`oh, it`s simple, but it`s easier to whine and cry in a forum thread

Thnx FrisbeeMonkey
WILDCORE 1K1WS is offline   Reply With Quote
Old 26th November 2002, 15:22   #197
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
To make sure your skin will work for both 488 and 490/491, build the skin on 491 but use mc.exe from 488..
cos there are more things than just maki that can stop the skin from working on 491...

-Plague
Plague is offline   Reply With Quote
Old 26th November 2002, 16:23   #198
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Quote:
Originally posted by DirtyLowMoFo
hammerhead
I'm attaching the script I have working.
BTW it works on build 488 & 491 but on 491 when closing Winamp it causes Invalid Page Fault (maybe just my POS pc)
Thanks DirtyLowMoFo!
hammerhead is offline   Reply With Quote
Old 27th November 2002, 18:15   #199
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Hello again everyone
hmm, seems like i have run into another scripting prob.
I am trying to make a script that changes the vis to off by a button. I have made an attempt at the script, but as usual it doesnt work. Can someone please help with it?

code:

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

Global Vis visdef;
Global Button buttonCheckBox;

System.onScriptLoaded()
{
visdef = System.getContainer("main").getLayout("normal").getObject("vis");

buttonCheckBox = System.getContainer("configure").getLayout("normal").findObject("vis-toggle");
}
buttonCheckBox.OnLeftClick()
{
If (visdef.getMode() == 1)
If (visdef.getMode() == 2)
visdef.setMode(3);
}
}



Thanks,
hh
hammerhead is offline   Reply With Quote
Old 27th November 2002, 18:17   #200
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
if you look in the tips and tricks thread, I have already made such a script..

-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