-Mystikal
09-13-2005, 07:52 AM
Im wondering is it possible to create a object that you can click and drag?
All i can find is tutorials with flash mx. If you can find me a tutorial
thanks. :thumbsup:
w.brants
09-13-2005, 08:10 AM
Just look up the startDrag specifiction. It's not very difficult.
Assuming you have a movieclip on stage named mc1, add the following code to the framemc1.onPress = function(){
this.startDrag(false,0,0,Stage.width,Stage.height) ;
}
mc1.onRelease = mc1.onReleaseOutside = function(){
this.stopDrag();
}
or if you add the code to the movieclip itself, use onClipEvent(press){
this.startDrag(false,0,0,Stage.width,Stage.height) ;
}
onClipEvent(releaseOutside){
this.stopDrag();
}
onClipEvent(release){
this.stopDrag();
}
-Mystikal
09-13-2005, 04:23 PM
Thanks brants it worked. New to this stuff. :confused:
marinebro0306
09-13-2005, 11:08 PM
Also, you don't really need the 0,0 stuff. All you need is
on(Press){
startDrag()};
on(Release){
stopDrag()};
Copy and paste that inside the MC.