PDA

View Full Version : onmouseover - animation


mc^^^^
29th November 2001, 13:06
hey fellas,

ok first off i know ive been making a few topics today, but they r on different subjects and we know what happens if we role 5 q's into one topic, 3 answers.

ok i want to make a layer so that when it has a mouseover, the 'door' sliders open revealing somebuttons. how do i script it? how do i DO it? ive looked in other skins but all the other skins have all the shite rolled into one big confusing file, so just help me out here. cool.

I Am Trunks
29th November 2001, 13:32
Sorry can't help ya
but keep checking other skins like i do:D

mc^^^^
29th November 2001, 14:06
also on the topic of animation is there a way to get a sliding group to be ghost="1" at one end and ghost="0" at the other. reson is i have a half transperent skin and when my eq slides under it i can still see the bright parts of it.

mc^^^^
29th November 2001, 14:17
i tried using isVisible(1); at one end ans isVisible(0); at the other but it gets and error when compiling, also tried setalpha command but it does nothing

Gonzotek
29th November 2001, 15:15
Post the script you're trying to compile and I'll try to help. No promises, I'm learning too. :)

-=Gonzotek=-

Naamloos
29th November 2001, 15:32
there isnt a fucntion like : SetGhost(1) or something... too bad :(
maybe they can add that?


Also i don't think you need that, if it's just under every thing it won't do any harm to buttons :)at least if you do skin it under the buttons... maybe if it's on top you can use hide and show for your buttons...

mikekantor
29th November 2001, 18:52
You can have ghost="1" on the door, and have it respond to the mouse events of the buttons below it.

Or, you can use the (x,y) coordinates of the mouse on the door to determine how the buttons below need to behave.

mc^^^^
30th November 2001, 01:48
i dont get what your tryn 2 say there mikekantor, i dont want to post the script yet as i want to do the whole lot on my own. i dont want someone making the scripts 4 me cause then i cant learn.

mikekantor
30th November 2001, 05:52
What I'm saying is you have 2 options:

1. Have the buttons respond and behave according to the mouse position on the door above them.

2. Have the door respond and behave according to the mouse position on the buttons below it.

For example of case 1:

door.onEnterArea(int x, int y) {
//put code here to animate the door sliding away
if (x<=15 && x >=0 && y>=0 && y<=15) {
/*
put code here for a button that is located within the square of coordinates 0,0 0,15 15,15 and 15,0 in order to have it do something
*/
}
}

Most likely, the button will have to be an animatedLayer that has the different button states as different frames in an animation, and you can jump around those frames by using gotoFrame().

This will give the user the impression of a door that slides away, and reveals a button that look/feel/smell/behave like buttons do.

Depening on how the butons are positioned, case 2 may be easier to code. I myself used somehting similar in my skin, but removed it becuase I didn't like the way my "door" looked, so I just have buttons there.


I don't think this is any clearer than what I said above, but who knows... maybe it is.

mc^^^^
30th November 2001, 08:06
that.made.no.sense.to.me

ok ive got the door to slide out of the way and reveale the buttons underneath but i dont want it to slide out of the way, i want it to roll away, like slide away but have an invisible line where it rolls into and disapears as it goes in, do i use regions? how do i do it?

mikekantor
30th November 2001, 08:08
put another image on top of it to cover it up.

mc^^^^
2nd December 2001, 13:04
ok i got tha first door working sweet but on attempt at the second door whenever i roll over door2 door1 moves to it. i think it maybe cause i havent completely closed the script for the first door, (the {'s & }'s) could that be right? do i have to put it in a seperate script? how do i do it?

mc^^^^
2nd December 2001, 23:44
^BUMP^

mc^^^^
3rd December 2001, 12:39
ok i fixed the doors conflicting but now i want door2 to slide off the side of the skin and dissapear, but it slides off the edge and i can still see it, ive tried sysregion="0" but it doesnt work, any ideas?

Naamloos
3rd December 2001, 12:47
Make your background smaller ;) so that it slides of the bg ;)

mc^^^^
3rd December 2001, 12:53
but the part it slides off is curved, and has transperecy.

mc^^^^
6th December 2001, 11:39
ok i can do it by an animated layer but i have heaps of animations and it will b 100000000000000 times quicker to do it by groups. is there any other way to get it to dissapear where there is no skin?