PDA

View Full Version : Falcon Computers Navigation effects?



macneilslt
May 2nd, 2006, 09:20 AM
http://www.falcon-nw.com/

anyone have any idea how they make the expanding cross hair in the navigation system? when you mouse over an object, it expands to fit it...then on mouse out it retracts to its normal form :q:

kortexvfd
May 2nd, 2006, 09:34 AM
My guess would be to have the crosshairs as a movieclip with the four pieces of the cross hair in it. Then on mouse over have a tween that expands that movieclip to the hieght and width of the hit target, hence moving those 4 pieces into place.

macneilslt
May 2nd, 2006, 09:39 AM
the effect is too seems to dynamic to be animated, if you check it out closely it differs a lot depending on the various x/y positions that you mouse over from...

kortexvfd
May 2nd, 2006, 10:01 AM
thats completely doable using on enterframes and/or the tween classes. That's the only way I can think of to have it work the way it does for each rollover.

JoshuaJonah
May 2nd, 2006, 10:07 AM
Umm.... theres a tutorial on it:)

http://www.kirupa.com/developer/actionscript/mouse.htm

kortexvfd
May 2nd, 2006, 11:20 AM
that's definately moving in the right direction (tutorial). You would just need to add tweens to position the clip and change the height and width.

geoken
May 2nd, 2006, 01:55 PM
that's definately moving in the right direction (tutorial). You would just need to add tweens to position the clip and change the height and width.

You don't need to use any tweens. You just need to find the difference between the current position and the target position and divide that number by an arbitrary number representing the speed, then add the result of that operation to the clips _x/_y.

For example, you could have something like this within your onRollover code.

clip._x += (target_x - clip._x)/2

kortexvfd
May 3rd, 2006, 09:21 AM
that makes sense as far as the x and y go, but without a Tween (and please note I am refereing to the scripted Tween class and not a frame based one) how are you making the clip change size to match the target's size?

geoken
May 4th, 2006, 09:26 PM
that makes sense as far as the x and y go, but without a Tween (and please note I am refereing to the scripted Tween class and not a frame based one) how are you making the clip change size to match the target's size?

If you look at the code I pasted you'll notice that it isn't telling the clips to move dirctly to the target x/y. It's only finding out the distance to the target x/y, then dividing that distance in half and adding that number to it's current position. In other words it's only moving halfway to the target each frame, thereby achieving a tween effect since it takes multiple frames for the clip to reach it's target.