Topic: moving menus border (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=11488" title="Pages that link to Topic: moving menus border (Page 1 of 1)" rel="nofollow" >Topic: moving menus border <span class="small">(Page 1 of 1)</span>\

 
paritycheck
Bipolar (III) Inmate

From:
Insane since: Mar 2004

IP logged posted posted 03-20-2004 15:23 Edit Quote

OK heres the scenario. I have like 5 buttons horizontally aligned of equal size, and I have one square border line a little bit bigger than the size of a button. I want that when ever I hover over a button on the menu row.. the border square follows and stops over the button my mouse is hovering over. I know as will be in play.. just need help on what to do plus snippets wold be most welcome

Cameron
Bipolar (III) Inmate

From: Brisbane
Insane since: Jan 2003

IP logged posted posted 03-21-2004 19:57 Edit Quote

So, are you saying you have no idea how to do this at all?

I seem to be comming to this forum quite a lot only to reply to somone's request for help by asking them more about the problem.

This only drags out the whole process and isn't fun for me, you or anyone else. So, for anyone reading this, please, be as descriptive as you can. Let us know what kind of programming experience you have (if the question is programming related) and whenever possible, provide visual examples or "work in progress" files for us to examine. None of the forum members get paid to help you, and whilst finding solutions to your problems may be easy for some of us, it's still time consuming. You need to show a little initiative and make things easier for those who drop by to offer their help. If you don't provide enough information, they may not be willing or simply not able to help you out.

So, paritycheck, if you could post a SWF & FLA file of the menu you're working on, and let us know how your actionscript skills are, we can get cracking on it. But without that, anything I provide may not be suitable for you problem and may even confuse matters even more.

Oh and incase nobody else has said so yet, welcome to the Ozone Asylum.

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

IP logged posted posted 03-22-2004 21:57 Edit Quote

Painfully primitive demo here.

If this is anything like what you were looking to do, scoop the source here.

Hope it helps.

Cameron
Bipolar (III) Inmate

From: Brisbane
Insane since: Jan 2003

IP logged posted posted 03-26-2004 16:50 Edit Quote

Nice one steve, but I'm curious as to why you put all the code on the button. I'd do things the other way around and simply send the "target" to the border which can avoid confusion of acidently overwriting the onEnterFrame event and allow for smoother transitions.

I've edited your example to demonstrate:

View the swf file.
Download the sourcep.

Edit: Dang UBB code...



[This message has been edited by Cameron (edited 03-26-2004).]

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

IP logged posted posted 03-27-2004 00:28 Edit Quote

Oh - that's cool too! Many solutions. Yeah, there is the possibility of overwriting the onEnterFrame. I guess in my mind having the button carry the function made it easier to add and subtract buttons if needed. A button that contained the code seemed more flexible, though looking at yours yours seems just as flexible. Guess that's just how the inspiration struck that day!

I don't see how the transitions are smoother one way or the other.

Oh and - if you modify the code (which I'm delighted you did), maybe consider modifying the notes layer too okay? So it doesn't get murky what version, and whose hands are involved, and what's been changed.



[This message has been edited by Steve (edited 03-27-2004).]

Cameron
Bipolar (III) Inmate

From: Brisbane
Insane since: Jan 2003

IP logged posted posted 03-27-2004 03:16 Edit Quote

Yeah, I edited the notes, but wasn't too sure on any kind of formality so I kept it real simple (smal amendment at the bottom). I mean, you did most of the hard work of setting up the mc's and all. Didn't really want to seem like I was stealing your thunder, just providing a slightly different way of doing things.

As for which way is better, like most programming languages there are a million ways to skin a cat. Although, when I started fiddling with your code (by removing the onRollOut handler, cause you had it stopping the animation whenever you moused out) it started doing some really weird things that I can only assume was happeing due to the overwriting of the onEnterFrame handler. I'm still not really sure what was hapenning there as either way should be just a valid but I was kinda tired when I started poking around with that so...

The idea of putting the animation in a driver function attached to the animated object probably stems from DHTML more than anything where we would build functions to animate object x to object y or to point x/y. One of the things I've also found interesting about flash is the varied ways people impliment the same kind of functionality. Perhaps for someone who's mainly worked with the flash environment for this kind of animation, the way you did things is a lot easier to understand and seems more logical.

Steve
Maniac (V) Inmate

From: Boston, MA, USA
Insane since: Apr 2000

IP logged posted posted 03-27-2004 14:21 Edit Quote

Well yes - mine does tend to go to shreds without the onRollOut!

That's because each button is a potential onEnterFrame generator. If you trigger one before the previous one is finished it does get ugly. So I made a shut off switch. But that means that if your roll out to a non-button area the border can stop in between buttons.

Cameron's solution that has just one onEnterFrame source is much better. I don't know if you stopped following this thread after asking the question paritycheck, but if you are following along you should use the solution Cameron presented.

paritycheck
Bipolar (III) Inmate

From:
Insane since: Mar 2004

IP logged posted posted 04-15-2004 07:01 Edit Quote

sorry for the delay guys had business Thanx Steve for the demo it was very much what I was looking for.



Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu