Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-02-2007, 11:53 AM   #1
p0c
I Flash In Public!!
 
p0c's Avatar
 
Join Date: Jul 2007
Location: Jersey
Posts: 351
Arrow Cleaner Movie Clip Dragging

I briefly remember seeing a tutorial for this somewhere but I cant find it anywhere. But is there a way to drag movie clips around using startDrag but with a cleaner more fluent motion as it a bit jolty when moving?

Anydony know the answer?
p0c is offline   Reply With Quote
Old 11-04-2007, 03:06 AM   #2
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,141
Default

increase your frame rate probably.
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 11-04-2007, 03:11 AM   #3
matbury
What's up pussycat?
 
matbury's Avatar
 
Join Date: Dec 2006
Location: Toronto, Canada
Posts: 1,983
Default

Is it something to do with update after event?
__________________
http://matbury.com/
matbury is offline   Reply With Quote
Old 11-05-2007, 02:58 PM   #4
p0c
I Flash In Public!!
 
p0c's Avatar
 
Join Date: Jul 2007
Location: Jersey
Posts: 351
Default

Now that rings a bell!
p0c is offline   Reply With Quote
Old 11-05-2007, 04:11 PM   #5
flash_boy
Need more FLEX!
 
Join Date: Nov 2006
Posts: 44
Default

Give this a shot... you actually place this on the movie clip. However I should let you know that this no longer works in AS3.

onClipEvent (mouseMove) {
setProperty (this, _x, _root._xmouse);
setProperty (this, _y, _root._ymouse);
updateAfterEvent(mouseMove);
}

Regards,
flash_boy
flash_boy is offline   Reply With Quote
Old 11-05-2007, 11:49 PM   #6
Jerico
Registered User
 
Jerico's Avatar
 
Join Date: Aug 2005
Location: Toronto
Posts: 127
Default

is this it?

http://www.stevenhargrove.com/smooth-startdrag/
Jerico is offline   Reply With Quote
Old 11-06-2007, 08:33 AM   #7
p0c
I Flash In Public!!
 
p0c's Avatar
 
Join Date: Jul 2007
Location: Jersey
Posts: 351
Default

Yeah thats exactly what im after although it is for an older version of Action Script I think
p0c is offline   Reply With Quote
Old 11-06-2007, 10:22 AM   #8
panel
AS3
 
panel's Avatar
 
Join Date: Mar 2007
Location: Warsaw
Posts: 1,991
Send a message via Skype™ to panel
Default

ActionScript Code:
var circle:Sprite = new Sprite(); circle.graphics.beginFill(0xFFCC00); circle.graphics.drawCircle(80, 80, 40); addChild(circle); circle.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown) circle.addEventListener(MouseEvent.MOUSE_UP, mouseReleased); function mouseDown(event:MouseEvent):void {     circle.startDrag();     stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); } function mouseReleased(event:MouseEvent):void {     circle.stopDrag();     stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); } function onMouseMove(evt:MouseEvent):void {     evt.updateAfterEvent(); }
panel is offline   Reply With Quote
Old 11-06-2007, 01:08 PM   #9
p0c
I Flash In Public!!
 
p0c's Avatar
 
Join Date: Jul 2007
Location: Jersey
Posts: 351
Default

Thanks again Panel it seems to work but i do get this error when starting...

"Warning: 1090: Migration issue: The onMouseMove event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseMove', callback_handler)."

Any ideas?
p0c is offline   Reply With Quote
Old 11-06-2007, 01:22 PM   #10
matbury
What's up pussycat?
 
matbury's Avatar
 
Join Date: Dec 2006
Location: Toronto, Canada
Posts: 1,983
Default

We'd have to see your mouseMove and callback_handler functions to know what the problem is.
__________________
http://matbury.com/
matbury is offline   Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
targeting embedded button in movie clip sleepydad ActionScript 2.0 2 02-10-2006 08:53 PM
drag and drop from a movie clip... batgirl_sa ActionScript 1.0 (and below) 2 09-04-2005 06:00 AM
Skinning components with embedded components epeace Components 5 06-16-2005 08:35 PM
movie clip loader 2.0 freak ActionScript 2.0 1 05-30-2005 03:40 PM
Movement in Duplicating a movie Clip Fishinghat ActionScript 2.0 7 08-24-2004 07:01 AM


All times are GMT. The time now is 05:18 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, 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.