Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : onEnterFrame issues


waveturtle
6/18/2004 10:30:53 PM
I'm using the following code to scroll a movie clip from side to side at the
bottom of the stage...
How do I make it so the scrolling ONLY occurs when the mouse is over the movie
clip and not when the mouse is over other parts of the stage.
Any help is appreciated

onClipEvent (load) {
stageW = 534;
}
onClipEvent (enterFrame) {
this._x += (stageW-_root._xmouse-_x)/10;
}

Jack.
6/18/2004 11:05:00 PM
add a hitTest,

onClipEvent (enterFrame) {
if(this.hitTest(_root._xmouse,_root._ymouse,1)){
this._x += (stageW-_root._xmouse-_x)/10;
}
}

hth,
waveturtle
6/18/2004 11:38:12 PM
AddThis Social Bookmark Button