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

movie clip events

Status
Not open for further replies.

archisoft

Programmer
Dec 19, 2001
15
0
0
IN
hi,
1). I have a problem.In button events more than one event can be put together like 'on(press,rollOver)' etc.can the same be done for movieclip events like 'onclipevent(mouseMove,mouseDown)'.
the problem I am facing is when 2 separate clip events exist
they clash with each other.

2).Is there any way by which I can disable flash actionscript on any condition(s).

3).please see following code.

onClipEvent (mouseDown) {
_root.scr=1;
if (_root.Map._xscale == 100&&_root.scr==1&&_root.mse==1) {
if(_root._xmouse>30&&_root._xmouse<716&&_root._ymouse>240&&_root._ymouse<556){
startDrag (&quot;_root.Map&quot;, false, 555, 485, 195, 315);
_root.hand.gotoAndStop(2);
}
}

}
onClipEvent (mouseUp) {
_root.scr=0;
_root.Map.stopDrag();
startDrag (&quot;_level1.dragControl&quot;, true);
_root.hand.gotoAndStop(1);
}
onClipEvent(mouseMove){
if(_root._xmouse<20 or _root._xmouse>727.9 or _root._ymouse<237.3 or _root._ymouse>573.3){
_root.mse=0;
_root.Map.stopDrag();
_root.hand.gotoAndStop(1);
}
else{_root.mse=1;}
}

I use the above code to drag my map.but when the mouse suddenly goes out of the given bounds(in mouseDown condition),then mouse released and then when the mouse position is brought within the bounds the map gets stuck with the mouse and then moves with the mouse even when the mouse is in 'mouseUp'condition.
pl. check and clear my mistakes.
thank u

 
Guess this could partly be easier if you used the constrain feature of the drag feature!
Wangbar is our onClipEvent specialist, maybe he'll come up with something.
As for me... Too early this morning to analyse your code and visualize what you're trying to do! Maybe later!

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top