I have two pieces of code, that won’t work together…
First: this makes a hitTest on an mc to make it run on rollover:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe<this._totalframes) {
nextFrame();
}
} else {
if (this._currentframe>1) {
prevFrame();
}
}
}
This works - until I put the next part of code inside to make the parent mc scroll:
web_slide.scrollRect={x:0,y:0,width:250,height:104}
btn_up.onRelease = function () {
if (web_slide.scrollRect.y = web_slide.scrollRect.y ) {
var newpos=web_slide.scrollRect
newpos.y-=53
web_slide.scrollRect=newpos }}
btn_down.onRelease = function () {
if (web_slide.scrollRect.y = web_slide.scrollRect.y - 106 ) {
var newpos=web_slide.scrollRect
newpos.y+=53
web_slide.scrollRect=newpos }}
Each work seperately, but they won’t together. How do I get around this?