Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Actionscript RollOver Effect

Status
Not open for further replies.

wikfx

IS-IT--Management
Dec 16, 2001
196
MT
Hi I am doing a menu with tabs that looks like a tabs in a book the problem is they overlap I would like for wen something gets rolled ovr that it shows the whole tab, the problem is that everytime a tab is clicked the tabs re-arrange so I cant really have something static I was thinking if there was a way in actionscript that you can bring the object to the fromt??
 
hi, thanks for the help I have another problem now this is the menu I am creating , the rollover effect works well I used :

on (rollOver) {
_root.tab1.swapDepths(_root.top);
}
on (rollOut) {
_root.top.swapDepths(_root.tab1);
}

actionscript for each button, where tab1 is the button name and top is an invisible dot placed on a layer above the menu, now all I need is that when a button is clicked the movie goes to a specific frame I added some gotoAndStop(); but the move goes haywire, I made the movie so that if a tab on the left side is cliked it goes to another frame so it rearanges the tabe like as if you were flipping a book, like 5 tabs on one side and 7 on the other or 1 tab and 11 tabs I think you know what I mean anyway here is a copy of the fla too please let me know if you figure something out :)
 
sorry the link ws dead for a short time my server was down, technical problems.
 
Well, I'm a bit confused... But you might solve your problem by adding _root to your gotoAndStop("frame_label")...

Second, it's a bad idea to use numbers as frame labels, Flash will be as confused as I am... Thus, you should change your number labels to...

For example, rather than a label -> "1:11" use someting like frame1_11...

Thus on your first tab, if I understand this correctly, use...

on (rollOver) {
_root.tab1.swapDepths(_root.top);
}
on (rollOut) {
_root.top.swapDepths(_root.tab1);
}
on (release) {
_root.gotoAndStop("frame1_11");
}

Of course you'll have to add the correct target on all tab1's on all different frames...
 
ok I tried that but its still mixing them up when I release on a tab it mixes the whole menu up I think it has something to do with the rollover and rollout coz it only swaps the depths wen its rolled out but if you click it wont swap coz you didnt roll out is there a way to set a default value? like the object top will ALWAYS be on top unless its told so all I have to do is call a rollover and I wont need a rollOut, the roll out would occurr automatically? do you get what I mean?

WiK
 
You can add a press to your rollOut if you need to:

on (rollOut, press) { //or release if that works better
_root.top.swapDepths(_root.tab1);
}

Adam
 
thanx again, this damn thing is still not working, I dunno why but when a tab is clicked it goes to the frame its sopposed to but jumbles everything up. I will post the fla at if someone wants to take a look at it, that would be very helpful.

WiK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top