Jump to content


Draggable Movie Clips in Flash 8 continued....


  • You cannot reply to this topic
2 replies to this topic

#1 jburton

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 05 January 2006 - 03:02 PM

Ok problem half solved here; great the box now drags!!!

but; when i clicked.. refuses to stop dragging???

on (press) {
startDrag (this, true);
}
on (release) {
stopDrag ();

using that peice of code directly applied to the box in question...

problem is when i release the box.. it doesen't stop dragging????

also the movement doesent seem to be very fluid neither??and the the box seems to be dragged only by the cursor via the top left hand corner of the box?

and ideas? solutions? here's what i mean..


http://jburton.hlgaming.com click updates,..

Edited by jburton, 05 January 2006 - 03:03 PM.


#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 05 January 2006 - 03:44 PM

ok, first booboo :)

NEVER put code inside MC's.. always in the root..
And I would also try to increase the framerate of your movie to 24 or 25 fps.
Regarding the actionscript here a small example:

Give your boxes an instance name like (box1) and insert the code in the maintimeline would look like this:
box1_mc.onPress = function(){
startDrag(this);
}
box1_mc.onRelease = box1_mc.onReleaseOutside = function(){
stopDrag();
}

I don't think I need to explain how you target movieclips :)

Have fun :P
Tiago

PS: Nice site / layout :D

#3 jburton

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 05 January 2006 - 05:39 PM

thanks an absolute bunch for the help dude and thanks alot
for your comments on the site; really flattered iam..

thanks so much

jburton :) :P :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users