Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-18-2003, 06:19 PM   #1
actionscript junkie
scot's Avatar
Join Date: Mar 2003
Location: dark alley
Posts: 489
Question any ideas on a custom cursor and a draggable button

I'm developing a app that has a custom cursor and a bar that has a MC that is draggable...

basicly a volume bar with a custom cursor, all is working great except when I grag the volume bar the custom cursor doesnt move

any way arround the lmitation of startDrag() and stopDrag() only allowing 1 MC to be dragged .....

i've searched around but nothing as helped....

any ideas........suggestions.......workarounds.......i nput........etx..........

FLA is here

example is here

thanks in advance for anything.
scot is offline   Reply With Quote
Old 10-18-2003, 08:53 PM   #2
village halfwit
pixelwit's Avatar
Join Date: Jul 2001
Location: USA, PA
Posts: 3,330

The following code will let any movieclip drag ONE other clip. To drag two clips at the same time just use 2 different controlling clips as shown.
ActionScript Code:
MovieClip.prototype.dragIt = function(clipToDrag){     this.onMouseMove = function(){         var p = {x:_root._xmouse, y:_root._ymouse};         clipToDrag._parent.globalToLocal(p);         clipToDrag._x = p.x;         clipToDrag._y = p.y;         updateAfterEvent();     } } MovieClip.prototype.dragNot = function(){     this.onMouseMove = null; } createEmptyMovieClip("JustSomeClip", 5); createEmptyMovieClip("Container", 10); Container._x = 100; Container._y = 100; var dot1 = Container.createEmptyMovieClip("Dot", 10); dot1.lineStyle(36, 0); dot1.lineTo(1, 0); var dot2 = createEmptyMovieClip("Dot", 20); dot2.lineStyle(24, 0xFF0000); dot2.lineTo(1, 0); onMouseDown = function(){     JustSomeClip.dragIt(dot1);     Container.dragIt(dot2); } onMouseUp = function (){     JustSomeClip.dragNot();     Container.dragNot(); }
Hope it helps,

There are no answers, only choices.
pixelwit is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:37 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.