View Full Version : animatedlayer on mouseover
mc^^^^
4th November 2001, 10:48
how do i make a door like thing that slides open when the mouse passes over the door, to reveal a number of buttons underneath? is there a quick way or does it have to have a script, if it needs a script can i have it a multiple script so i can just define what to do in the xml and have the single script be used by multiple doors?
i have tried this by going through other skins but failed.
Naamloos
4th November 2001, 12:17
Make two layers (for the door)
And in the script load these, and use OnMouseOver ;)
mc^^^^
4th November 2001, 12:37
what?
onmouseover="door.link.to.elements"
onmouseout="door.otherlink.to.element"
if this is right what about the animation part?
Naamloos
4th November 2001, 18:41
I think something like :
-defining door
-onmouseover move door up
-onmouseout move door down (I dunno if it's possible)
something like that
mc^^^^
4th November 2001, 22:29
i dont know where that goes in a script or xml, that doesnt sound right (not that i know), anyone else that knows?
Lucas
5th November 2001, 03:15
Can be achived with scripting.
layer.onEnterArea() {
// hide or show or animate some layers
}
layer.onLeaveArea() {
// hide or show or animate some layers
}
It *really* depends on what you want to do and how you want to do it. I'm doing something for Epsilux and I'll post some code tomorrow, it should help you.
Regards,
-L
mc^^^^
5th November 2001, 07:19
scripting takes skill, skill that i dont have, does the script go like:
layer.onEnterArea(Animation) {
// hide or show or animate some layers
}
layer.onLeaveArea(Animation2) {
// hide or show or animate some layers
}
or something, is there a basics or scripting tut anywhere apart from rt's site which isnt really a tut? i not does anyone want to write a small one for me and others that have no idea but want to?
mc^^^^
5th November 2001, 11:15
ummmmm :confused:
lil help :confused:
Bizzeh
5th November 2001, 22:32
the "Official" skin BoxOr has somthing like this... y dont you check out the scripts to this:D
i always do stuff like that
:D :D :cool: :D :D
mc^^^^
6th November 2001, 05:57
Originally posted by [][][]-pyuria-[][][]
i have tried this by going through other skins but failed.
this includes boxor, most other skins with this decide to crash wasabi in beta 1 which is a big pain.
Naamloos
6th November 2001, 06:22
The source code isnt included in those "official" skins :(
*right?* I havent checked but Im really think it's like that
mc^^^^
6th November 2001, 10:38
there is no .m files, just maki, now can some1 help me?
mc^^^^
7th November 2001, 10:46
my skin is currently at a progress rate of 0% I NEED HELP! we all like downloading new skins and if i were helped you would all probably have beta 1 now. i have tried over and over but cant get it, PLEASE HELP ME SOME ONE!
Naamloos
7th November 2001, 12:43
Go and take a script (like a drawer script) rip it apart and use the code what is in the other posts in this thread, that will help you
Spoonman
7th November 2001, 16:23
This isn't drawers or anything that fancy, just some rollovers. From my Diablo II Pentagram skin:
DIIAnimLayer.onEnterArea() {
DIIAnimLayer.setStartFrame(1);
DIIAnimLayer.setEndFrame(10);
DIIAnimLayer.setAutoReplay(1);
DIIAnimLayer.setSpeed(50);
DIIAnimLayer.play();
}
DIIAnimLayer.onLeaveArea() {
DIIAnimLayer.setStartFrame(10);
DIIAnimLayer.setEndFrame(0);
DIIAnimLayer.setAutoReplay(0);
DIIAnimLayer.setSpeed(5);
DIIAnimLayer.play();
}
Naamloos
7th November 2001, 17:03
You made an animation you can also do something like
DIIAnimLayer.onEnterArea() {
DoorLayer.setY();
doorlayer.SetSpeed()
Doorlayer.gototarget()
}
mikekantor
7th November 2001, 18:33
The boxor skin had the source with it. I am looking at it once in a while to see how to do some things.
Instead of,
DIIAnimLayer.onEnterArea() {
DIIAnimLayer.setStartFrame(1);
DIIAnimLayer.setEndFrame(10);
DIIAnimLayer.setAutoReplay(1);
DIIAnimLayer.setSpeed(50);
DIIAnimLayer.play();
}
DIIAnimLayer.onLeaveArea() {
DIIAnimLayer.setStartFrame(10);
DIIAnimLayer.setEndFrame(0);
DIIAnimLayer.setAutoReplay(0);
DIIAnimLayer.setSpeed(5);
DIIAnimLayer.play();
}
the boxor skin passes values to a function that does similar things.
Anyway... I even improved upon it, for the onLeaveArea(), if you replace "setStartFrame(10)" with setStartFrame(DIIAnimLayer.getCurFrame())", it will rewind from the point where it left off, so your animation won't appear to snap.
Spoonman
8th November 2001, 17:31
Hey, that works. Good stuff. One thing I neglected to mention before. The code I posted is for rollovers. If you're making rollunders like I am, you'd have to do it more like Box0r does, with procedures, and you'd have to call your animated layer from your button. As in:
Previous.onEnterArea() {
StartAnimation(PreviousAnim, 1, 10, 50);
}
Notice the the base is "Previous", a button, but the StartAnimation is on PreviousAnim, an animated layer. StartAnimation() is the procedure out of the box0r script, which you may have to modify for your purposes (I did).
YtseJam
8th November 2001, 17:41
This is getting C'ish, /me like. :)
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.