View Full Version : Help on scripting...
Evil Pumpkin
29th November 2001, 22:34
Hi!! I'm an Italian Boy and I'm new here...so I have some problems...
Can I use animatedLayers for Togglebuttons??
I tried to use an animatedLayer that opens when I move over on it and under it a standard togglebutton but if I set ghost="0" I can't click on the button below and if i set it to "1" the layer won't animate with OnEnterArea Function....:(
Can someone help me?!?:confused:
thank in advance!:)
mc^^^^
30th November 2001, 03:11
ooo ooo! can i please grab that script off you and the shit that goes around it (in the .xml's) cause im havn trouble makn the script 4 that.
e-mail (dyka@ii.net)
i might even b able 2 help you out.
mikekantor
30th November 2001, 06:08
Use ghost="1" on the animated layer and use mouse events from the button to start/stop/reverse the animation.
If you need something more descriptive, tell me and I'll be glad to help.
mc^^^^
30th November 2001, 07:12
its not an animated layer, it is a group that is simply activated when the toggle button is pressed and then the script moves it.
Evil Pumpkin
30th November 2001, 16:48
I take the script(for the buttons) from boxor and modify it. now it is:
Function StartAnimation(AnimatedLayer l, int start, int end, int speed);
Class AnimatedLayer AnimatedLayerHint;
Global Layout Main;
Global AnimatedLayerHint Play;
System.onScriptLoaded() {
Main = getContainer("Main").getLayout("normal");
Play = Main.getObject("Button.Play");
}
Play.onLeftButtonUp(int x, int y) {
gotoFrame(6);
system.Play();
}
Play.onLeftButtonDown(int x, int y) {
gotoFrame(6);
}
Play.onLeaveArea() {
StartAnimation(Prev, getcurframe(), 0, 6);
Stat.setText("...");
}
For my problem I'll post something more tonight...;)
thanksss
Evil Pumpkin
30th November 2001, 16:51
Oooops...I forgot the function:
// Functions
StartAnimation(AnimatedLayer l, int start, int end, int speed) {
l.stop();
l.setStartFrame(start);
l.setEndFrame(end);
l.setSpeed(speed);
l.setAutoReplay(0);
l.play();
}
:D :D
Evil Pumpkin
30th November 2001, 20:09
Sorry for 3 posts:p
so my problem is this:
I have this togglebutton
http://loremarchi.supereva.it/cross.png
and over it this AnimatedLayer
http://loremarchi.supereva.it/cover.png
when the AL stops i can see the button but i can't click on it and turn On/Off...:(
if I set the ghost="1" the AL doesn't animate...
What can I do?!?!:confused: :confused:
mikekantor
30th November 2001, 20:36
animate the AL inside the script by using onEnterArea() and onLeaveArea() on the togglebutton.
Evil Pumpkin
1st December 2001, 16:52
Mmm...I'm very stupid....
I'll try! thanks:D
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.