![]() |
#881 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
rotation layer
Hi peeps
![]() I know you guys are always busy with us noobs, but if we don't ask we don't learn ![]() I have coded all this tape deck to work as it should but I am struggling to get a script to rotate the cassette tape reels x4 at different speeds on play and stop on stop&pause. Any help will be greatly appreciated Steven ![]() |
![]() |
![]() |
![]() |
#882 |
Candyass
(Major Dude) |
The easiest approach for me would be to have multiple images one each state
1. Stopped 2. Playing (this would be an animated layer in xml) 3. FWD (same as above but, with faster transitions) 4. RWD (same as above but, reversed) 5. Pause (Perhaps, one frame and tick back and forth) |
![]() |
![]() |
![]() |
#883 | |
Late skinner & Moderator
Join Date: May 2003
Location: Argentina
Posts: 1,629
|
Quote:
|
|
![]() |
![]() |
![]() |
#884 | |
Late skinner & Moderator
Join Date: May 2003
Location: Argentina
Posts: 1,629
|
Quote:
code: So I guess it wouldn't be hard to use something like code: and show/hide the other animations accordingly. In my experience this is easier to say than to do, so it can take (me) weeks before doing it right... |
|
![]() |
![]() |
![]() |
#885 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
sorry I didn't make it clear but all 4 reels are 4 individual layers or pngs just stuck them in one png to show you them .
hope someone can do it as I just got to learn about xml. lol but learn fast as I got a good teacher ![]() |
![]() |
![]() |
![]() |
#886 |
Candyass
(Major Dude) |
I am thinking this only needs to be several animatedlayers in the player xml; one for each state. Then it should be a matter of just enabling them in some way (like using the width/height = 0 when not in use and when x (button) is clicked set their width/height.
This is a hack; but one that should be relatively easily used. Sample RunningDisplay.m code: Note: This is pseudo code for a maki script to handle animated layer swapping based on user clicks. |
![]() |
![]() |
![]() |
#887 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
![]()
I like the theory as same was in flash I was doing a project.
question 1 wouldn't all layers be running constant even though invisible? question 2 or would you save the position of the active layer on button click so that the next visible layer would start as the same position ? thanks for your help guys ![]() Steven ps. if we or you lol figure this out it be so cool for all different animations in winamp skinning |
![]() |
![]() |
![]() |
#888 |
Candyass
(Major Dude) |
The hide method disables the acrive layer. Technically it is still running I suppose, but as it is an png is should be very limited...And of course you could just disable the frame entirely instead of hiding/showing. And yes ro question 2, the ordinal position are.expected to be in the same position...though it could be u used in any situation.
|
![]() |
![]() |
![]() |
#889 |
Late skinner & Moderator
Join Date: May 2003
Location: Argentina
Posts: 1,629
|
When I get home I'll compile it and test it, it's a handy script to have.. It's probably missing a few lines but it should be straight forward (like EVERYTHING in Winamp skinning lol)
|
![]() |
![]() |
![]() |
#890 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
05:03 am here waiting on the test results and designing the eq
![]() |
![]() |
![]() |
![]() |
#891 |
Late skinner & Moderator
Join Date: May 2003
Location: Argentina
Posts: 1,629
|
Oops, I totally forgot about it, sorry, maybe tomorrow, now I'm off to sleep!
|
![]() |
![]() |
![]() |
#892 |
Candyass
(Major Dude) |
Funny, technically speaking I have yet to create a modern winamp skin.
|
![]() |
![]() |
![]() |
#893 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
well get to it
![]() |
![]() |
![]() |
![]() |
#894 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
Cant get my maki script to compile windows 10 pro grr
|
![]() |
![]() |
![]() |
#895 |
f(caffeine){
return wasabi; } (Forum King) Join Date: Jul 2001
Location: Sweden
Posts: 3,984
|
If you want to spin the layers via scripting, I did that on an old Stargate skin years ago.
The gate itself is the seeker, and spins clockwise during playback. There is also a "simulator" mode, where the gate can be dialed, like in the show, and the gate will spin both directions and lock chevrons, just like in the show. Feel free to dig around the code and use what you want: Stargate Winamp - SG1 Edition The scripts you might be interested in are: scripts\lib\rotationlayer.m scripts\gate-playermode.m and maybe: scripts\gate-simmode.m |
![]() |
![]() |
![]() |
#896 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
![]()
Thanks m8 will have a look as I know zero about maki
![]() and most other things lol quick question... how do I get a toggle button to hide then unhide a layer? Thanks Steven |
![]() |
![]() |
![]() |
#897 |
f(caffeine){
return wasabi; } (Forum King) Join Date: Jul 2001
Location: Sweden
Posts: 3,984
|
It was ages since I last played with maki, but basically if you want to specifically use a tooglebutton (so that it stays pressed when the layer is in one state, and then stays unpressed when the layer is in another state), then I'd suggest using cfgattribs for that.
For example, in dhd-playermode.xml, you find this line, that will toggle the iris on the gate: code: The cfgattrib is the interesting part, the GUID you see there {258968BA-8E47-453c-A008-4433A6EB298E} is for a hidden config page in Winamp. After the GUID, you specify the variable you want to use (Iris). Then, in attribs.m and gate-playermode.m, you will find the needed script code to handle it. Basically, you need to add the attrib in maki and use it to toggle the layer you want to show/hide. For example: code: The reason for using cfgattribs is that the layer and buttonstate will always be synced. |
![]() |
![]() |
![]() |
#898 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
![]()
Cheers m8 saw this last night but was to sleepy to comprehend what the code was doing
![]() Now that I am awake lol I giving it a go! Thanks a lot Steven p.s Is there a maki book that I could get to learn it ? also I read a few of the posts on forum about where to store/learn/teach the maki scripts to the masses. I have a web domain that I have had for ages and have struggled to find a useful use for it but would gladly hand to someone to do as they please for the purpose of store/learn/teach the maki script ![]() |
![]() |
![]() |
![]() |
#899 |
f(caffeine){
return wasabi; } (Forum King) Join Date: Jul 2001
Location: Sweden
Posts: 3,984
|
No there is no maki book as far as I know.
The best source for learning maki was the so called "Canada" documents, but those are offline since a very long time. There is a Wiki for Modern Skins that you can use for reference: http://wiki.shoutcast.com/wiki/Creating_Modern_Skins Otherwise, I'd just suggest digging into the included .mi files in Winamp, for example std.mi and config.mi. They have good commenting on most of the functions to help you understand how things work. Another tip is to start digging through a simple skins sources, for example the Winamp3 base skin or the Wasabi.player base skin (links in my signature). My D-Reliction skin (link in my sig) could also be a good source for doing a little bit more advanced stuff, without it getting too complicated to understand. All my maki sources are included, and they should be fairly easy to understand. The Bento and Winamp Modern skins are in my opinion built in a way that is a bit too complicated if you want to learn basic maki. Also, dig through this forum thread, from the beginning, as there are tons of useful small scripts and tips right from the start. |
![]() |
![]() |
![]() |
#900 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
I give up I cant complete my skin
![]() ta |
![]() |
![]() |
![]() |
#902 | |
Late skinner & Moderator
Join Date: May 2003
Location: Argentina
Posts: 1,629
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#903 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
Its just the stupid little things like bass/treble like volume .. did everything as asked and doesn't work no errors or anything.. I been on this every days for weeks and I only got 3 things left to do and I have done all asked but nothing works ... maybe I over working it I don't know.
thanks victhor Steven |
![]() |
![]() |
![]() |
#904 | |
f(caffeine){
return wasabi; } (Forum King) Join Date: Jul 2001
Location: Sweden
Posts: 3,984
|
Quote:
The original url was: http://canada.landoleet.org/docs/pub...guiobjects.php I can't find them on the Wayback Machine, but I do have a local backup of them. They are still very good for learning modern skinning though and, as it happens, a Wa5 version is still online: http://wiki.winamp.com/wiki/XML_GUI_Objects The above docs are great for learning how the XML and XUI components work. And there are some pretty advanced stuff that can be done simply by learning how XUI objects work, how to create them, etc. |
|
![]() |
![]() |
![]() |
#905 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
hi plague
the backup copy of them can you send me a copy please tA Steven |
![]() |
![]() |
![]() |
#906 |
f(caffeine){
return wasabi; } (Forum King) Join Date: Jul 2001
Location: Sweden
Posts: 3,984
|
I actually recommend you work with the Winamp5 version that I linked in my previous post.
It contains mostly the same stuff anyways. My local copy of the old docs are from the Winamp3 days, and contain some stuff that would not work in Winamp5. |
![]() |
![]() |
![]() |
#907 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
can u still ask for a maki script help ?
I need a maki script [half] written/fixed and compiled as it wont compile on windows 10
![]() as soon as I get this done my first skin will be complete ![]() I am making a double tape jvc skin and all working apart from the rotation, the way that I have did it is ... if I would have did it as one big animation the .png would have been huge [and would have needed 5 of them], so I split it into an individual reel for each animation and then just multiplied it by 4 to make the double cassette. but when I run the script it only works on the first reel and not on the other 3. I have seen a for statement used in a maki script but I have no idea how to write it. I included the .m file I am using at present and some .xml code hope someone still knows this stuff lol Steven code: |
![]() |
![]() |
![]() |
#908 |
Senior Member
Join Date: Aug 2015
Posts: 181
|
forget last comment all fixed
![]() |
![]() |
![]() |
![]() |
#909 |
f(caffeine){
return wasabi; } (Forum King) Join Date: Jul 2001
Location: Sweden
Posts: 3,984
|
Local file path string handling in maki
Aight, so it's not exactly straight forward to do file handling in maki.
One problem is that backslashes in strings cannot easily be handled in maki. For example, consider this path (which is what a path from getPlayItemString() would look like): file:\\c:\music\artist1\album1\song1.mp3 What if I want to get a string with only: c:\music\artist1 ? That's not easy. getPath(getPlayItemString()) will only return: file:\\c:\music\artist1\album1 We still need to remove: file:\\ and: \album1 Backslash is an escape character, so to search for a backslash in a string, one would normally have to write two backslashes: "\\". But, the compiler will not compile the script if one tries to do that. Another way is to look for the ASCII code for backslash: 92 But, if one tries to do a string search for Chr(92), it will return true for every single character in that string. Not even getToken will work with backslash as separator. However, there is one way to do it: urlEncode. If we urlEncode the string, then every backslash will be replaced with: %5C Now that we can search for. So, here is a small script that finds the parent folder of the currently playing file: PHP Code:
|
![]() |
![]() |
![]() |
#910 |
f(caffeine){
return wasabi; } (Forum King) Join Date: Jul 2001
Location: Sweden
Posts: 3,984
|
Attempt #2: Local file path string handling in maki
Hmm, so it seems getToken doesn't handle multiple characters as token, which means my previous script may not always work.
There's also an easier way to get the full filepath without the "File:\\" part. So, here's a better version, that I've also put into it's own function, for easier handling. PHP Code:
You need to add the following line where you declare your global variables: PHP Code:
PHP Code:
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|