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

startdrag, constrained zone, loosing other buttons function 1

Status
Not open for further replies.

booya

Technical User
Mar 8, 2000
44
KH
hi I try to have a follow the mouse on a constrained area, this i can achieve but my problem is that it desables all my other buttons>>> anyone can help?
 
You'll have to use a script to simulate the effect of drag to get around this, attach this to the movie clip you want to "drag":

onClipEvent(load){
//set up your constraints
top=100;
bottom=300;
left=50;
right=400;
}
onClipEvent(enterFrame){
if(_root._xmouse<right && _root._xmouse>left){
_x=_root._xmouse;
}
if(_root._ymouse<bottom && _root._ymouse>top){
_y=_root._ymouse;
}
} Slainte

 
it doesn't seem to accept the onclipevent thingy
when i paste the code into the first frame of the movie clip it says to me that there is an error in the script.
the actual onclipevent is desabled in the list of actions..
any clues?
cheers anyway
 
onClipEvent shouldn't be put into a frame - attach it to the &quot;outside&quot; of the clip instead:

First remove the code you put in the frame then select the clip on the stage (so that you get the blue selection outline) then put the script into the actions panel at that point - don't go as far as selecting a frame and pasting it in, events don't work at that level. Slainte

 
thanks dude you're the chief !!
it works now, sxuze mi french and mi poor actionscript knowledge>>>

o <----thanks mate
/0/ \
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top