Old 18th March 2005, 22:47   #1
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Unhappy XML makey head hurt :(

Howdy peeps,

I'm breaking down and asking for help because I thought about giving up.
Then I thought, Shut Up! Sirat you pansy!

Anyway.. Working on first WA skin and I've got snappy graphics just not enough code working right.
Specifically i'm trying to get an average beat animation to work. Just a layeranimation linked to beat.
I've got the scripts from Frisbee and others but no matter what i've tried, I get Null object found and Divide by zero errors.

I have other animations running and AniSeek and Anivolume and they all work just fine.

Any tips? Wits end.

Sirat
Sirat is offline   Reply With Quote
Old 18th March 2005, 22:59   #2
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
The problem is probably in the MAKI script and not in the XML, however a Null Object error means that the script is calling for an object that does not excist in the XML document. Make sure you have the identifications correctly typed in both the XML and MAKI scripts.

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 18th March 2005, 23:25   #3
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
I hear what your're saying.
It ain't the script. I got that from Maki Cheats and other versions from working skins.
I'm sure it's my end but i've thrice checked the element names because that was my problem when trying to get seek and volume ani's working.

My guess is that I need to use a specific scriptID for the animation like with SeekAni.

This works fine:

<script id="seek" file="scripts/seekbyframe.maki"/>
<AnimatedLayer
id="SeekAnim"
x="486" y="18"
w="104" h="7"
image="player.anim.seek"
move="0"
autoplay="0"
autoreplay="0"
/>

Right below it I have:

<script id="Vis" file="scripts/customvis.maki"/>
<AnimatedLayer
id="VisAnim"
x="486" y="8"
w="104" h="7"
image="player.anim.Vis"
move="0"
autoplay="0"
autoreplay="0"
/>
and it gives me the errors.(customvis.maki)

Hmmm
Sirat is offline   Reply With Quote
Old 18th March 2005, 23:28   #4
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
try this:
PHP Code:
<AnimatedLayer
          id
="VisAnim"
         
x="486" y="8"
         
w="104" h="7"
          
image="player.anim.Vis"
          
move="0"
          
autoplay="0"
          
autoreplay="0"
        
/>
<
script id="Vis" file="scripts/customvis.maki"/> 


krckoorascic is offline   Reply With Quote
Old 18th March 2005, 23:32   #5
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
That would be a negatory.

Fastest reply in history though.
;0

Sweet sig too.
Sirat is offline   Reply With Quote
Old 18th March 2005, 23:44   #6
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
Quote:
Originally posted by Sirat
...Sweet sig too.


can i see a script?


krckoorascic is offline   Reply With Quote
Old 18th March 2005, 23:55   #7
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
This is the script.
I got from here though, I doubt it has issues.

http://frisbeemonkey.com/winamp3/ref...hp?id_files=41
Sirat is offline   Reply With Quote
Old 19th March 2005, 00:05   #8
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
whell, if you use this script (unchanged) your animated layer must have id "Vis.Animation"...


krckoorascic is offline   Reply With Quote
Old 19th March 2005, 00:11   #9
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Yer some kinda XML ninja monkey.
It worky
Thx, had no what to look for. Now I do.

Kowtow to you.

BTW when I was a kid here in America there was a superhero named Montenegro and he was a mountain climber guy that swung around on a rope and fired a piton gun.

That you?
Sirat is offline   Reply With Quote
Old 19th March 2005, 00:20   #10
Schmeet
Major Dude
 
Schmeet's Avatar
 
Join Date: Oct 2004
Location: The timid west
Posts: 1,444
Your posts remind me of A clockwork orange. The huy in that film used to put ys on the end of words. Now i have that scary image of them with long noses. Thanks a bunch
Schmeet is offline   Reply With Quote
Old 19th March 2005, 00:23   #11
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
ha, ha, no!
Serbia & Montenegro is my country (ex Yugolsavia) its near the Italy (accross Adriatic sea)


krckoorascic is offline   Reply With Quote
Old 19th March 2005, 00:27   #12
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Ahhh that's too bad krckoorascic,

He had a cool hat with a feather in it.
.. and he'd shoot you.

Thanks again.

No big deal, but now i'm trying to use this script twice and it's resisting me. (2 different graphics)
Sirat is offline   Reply With Quote
Old 19th March 2005, 00:39   #13
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
try this:

(in xml)
PHP Code:
<AnimatedLayer 
  id
="anim1"
  
x="?" y="?" w="?" h="?"
  
image="animation.image1"
/>
<
AnimatedLayer 
  id
="anim2"
  
x="?" y="?" w="?" h="?"
  
image="animation.image2"
/>
<
script id="custom.vis" file="scripts/visualizations.maki"/> 
(in maki)
PHP Code:
#include "lib/std.mi"

Function Update();

Global 
Timer VisTimer;
Global 
AnimatedLayer Vis1Vis2;

System.onScriptLoaded()
{
 
Group grp getScriptGroup();

 
Vis1 grp.getObject("anim1");
 
Vis2 grp.getObject("anim2");
 
 
Update();

 
VisTimer = new Timer;
 
VisTimer.setDelay(30);
 if (
getStatus() == STATUS_PLAYINGVisTimer.start()
}

System.onScriptUnloading()
{
 
delete VisTimer;
}

VisTimer.onTimer()
{
 
Update();
}

System.onPlay(){ VisTimer.start(); }
System.onResume(){ VisTimer.start(); }
System.onStop(){ VisTimer.stop(); }
System.onPause(){ VisTimer.stop(); }

Update()
{
 
int vu = (getLeftVUMeter() + getRightVUMeter()) / 2;
 
Vis1.gotoFrame((vu 255) * (Vis1.getLenght() - 1));
 
Vis2.gotoFrame((vu 255) * (Vis2.getLenght() - 1));

this should work (havent tested)...


krckoorascic is offline   Reply With Quote
Old 19th March 2005, 00:41   #14
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Are you saying that i'd need to compile that script and replace the other?
Sirat is offline   Reply With Quote
Old 19th March 2005, 00:46   #15
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
yeap


krckoorascic is offline   Reply With Quote
Old 19th March 2005, 01:00   #16
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Thx I'll give it a try, got to leave now though.

Thanks for the help
Sirat is offline   Reply With Quote
Old 19th March 2005, 01:05   #17
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
anytime...


krckoorascic is offline   Reply With Quote
Old 19th March 2005, 06:34   #18
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Hello again peeps,

Phase 2: I've tried to compile this and get an 'exited with code 4' after running MC. It got partway through it looks like.

Not sure if this is relevant- I have no winamp 3 directory, and mc.exe wasn't on my hard drive. I got it online from the developers kit and put it in the folder with the .M script. It couldn't find lib\std.mi and stopped so I made a lib folder and put std in there.
Then it ran farther but stopped at mentioned error.

Never tried to compile anything before and if there's a good webspot for me to visit besides here then point me at it.
Sirat is offline   Reply With Quote
Old 19th March 2005, 06:58   #19
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
I just realized that this is probably relevant. lol-

syntax error at customvis.m17 [2] :

Then the code 4 error.
I didn't change what you posted at all.
Sirat is offline   Reply With Quote
Old 19th March 2005, 12:31   #20
PulseDriver
w3 addict
(Major Dude)
 
PulseDriver's Avatar
 
Join Date: May 2004
Location: Norway
Posts: 1,806
Hum, I am no expert, but putting the <script> tag before the called element will result in null object error doesn't it? Try moving the script below the animated layer insted..

09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0
PulseDriver is offline   Reply With Quote
Old 19th March 2005, 15:45   #21
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
sorry, i made mistake writting code, this should work:

PHP Code:
#include "lib/std.mi"

Function Update();

Global 
Timer VisTimer;
Global 
AnimatedLayer Vis1Vis2;

System.onScriptLoaded()
{
 
Group grp getScriptGroup();

 
Vis1 grp.getObject("anim1");
 
Vis2 grp.getObject("anim2");
 
 
Update();

 
VisTimer = new Timer;
 
VisTimer.setDelay(30);
 if (
getStatus() == STATUS_PLAYINGVisTimer.start();
}

System.onScriptUnloading()
{
 
delete VisTimer;
}

VisTimer.onTimer()
{
 
Update();
}

System.onPlay(){ VisTimer.start(); }
System.onResume(){ VisTimer.start(); }
System.onStop(){ VisTimer.stop(); }
System.onPause(){ VisTimer.stop(); }

Update()
{
 
int vu = (getLeftVUMeter() + getRightVUMeter()) / 2;
 
Vis1.gotoFrame((vu 255) * (Vis1.getLenght() - 1));
 
Vis2.gotoFrame((vu 255) * (Vis2.getLenght() - 1));



krckoorascic is offline   Reply With Quote
Old 19th March 2005, 16:57   #22
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Almost there I think...
I think there was a typo at .getLenght
Changed to Length and it runs with no errors but the 2 graphics are frozen.
If I refresh the skin they change length with the music but not in realtime. Just each time I hit F5.

This is fun
Sirat is offline   Reply With Quote
Old 19th March 2005, 17:52   #23
Sirat
Junior Member
 
Join Date: Mar 2005
Posts: 14
Well, strike the last, it works.

I restarted some things including Winamp and now it works perfectly.

Thanks for coming through for me krckoorascic.

Here's that comic book guy I mentioned, sure it's not you?

http://www.marvunapp.com/Appendix2/montenegropm.htm
Sirat is offline   Reply With Quote
Old 19th March 2005, 22:52   #24
krckoorascic
Senior Member
 
krckoorascic's Avatar
 
Join Date: May 2004
Location: Serbia
Posts: 351
Send a message via ICQ to krckoorascic Send a message via AIM to krckoorascic Send a message via Yahoo to krckoorascic
:P noup, when i last time looked in mirror it wasn't that


krckoorascic 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