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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with hitTest

Status
Not open for further replies.

Rhiannon

Technical User
Feb 8, 2002
55
US
Hi all,

Okay, I've got a movie that has magazine ads scrolling from right to left. What I want to do is when you rollover the ad a scrolls down over it, is slightly transparent, and info appears about that particular full page spread. Then upon rollout the box scrolls back up.

I'm using hitTest to do this and it's not working. When you roll over the ad nothing happens but there's a faint area just above it that shows a bit of the screen when you hit it. I've been sitting here all day looking at it and I just can't see it.

Code is:

onClipEvent (load) {
var origY = _parent.details._y;
var Y = _parent.details._y;
var bar = 0;
var blockHeight = _height;
var dropSpeed = 3;
var alphaSpeed = 7;
_parent.details._alpha = 40;
}
onClipEvent (enterFrame) {
if (_parent.details.hitTest(_root._xmouse, _root._ymouse, true)&& _root._ymouse >= 125) {
Y = origY+_parent.details._height-blockHeight;
bar = 100;
} else {
Y = origY
bar = 0;
}
_parent.details._y += (Y-_parent.details._y)/dropSpeed;
_parent.details._alpha += (bar-_parent.details._alpha)/alphaSpeed;
}


Help!
Rhiannon
 
i dont know what the ads are but

why not make the ads buttons (or movieclips if using mx) then just assign an on onRollOver command to them.
 
I tried doing it using loadMovieNum but it just doesn't work as smoothly as I like because the magazine ads are scrolling.

The rollover portion worked okay but the rollout was slopy.

I used the above code to do pretty much the same thing with a navbar but am having problems revamping it.

URL is When the flash movie ends click on "Preview Contents" and then click "Selection of Ads" when it appears.

Thanks
Rhiannon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top