Be a Supporter!

StartDrag() is a problem!

  • 391 Views
  • 3 Replies
New Topic Respond to this Topic
Gimmick
Gimmick
  • Member since: Aug. 20, 2008
  • Offline.
Forum Stats
Member
Level 27
Programmer
StartDrag() is a problem! 2009-03-22 16:10:00 Reply

When I want to make a movie clip that you can drag when you release it goes to the second frame and then, BAM! There is some text that you can edit, but it can't edit.

Code is:
on(press){
this.startDrag();
}
on(release, releaseOutside){
gotoAndStop(2);
stopDrag();
}

here is the alternative code. It solves the problem, but it just doesn't want to drag:

//with the variable of box.button
on(press){
startDrag(_root.box.button);
}
on(release, releaseOutside){
stopDrag();
gotoAndStop(2);
}
Can anybody help me?


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp
"Sit look rub panda" - Alan Davies

BBS Signature
Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to StartDrag() is a problem! 2009-03-22 18:06:19 Reply

At 3/22/09 04:10 PM, sanjeev98 wrote: this.startDrag();

Try startDrag(this); instead


- - Flash - Music - Images - -

BBS Signature
liam
liam
  • Member since: Dec. 11, 2004
  • Offline.
Forum Stats
Member
Level 22
Blank Slate
Response to StartDrag() is a problem! 2009-03-22 18:11:38 Reply

In the first bit of code you had the gotoAndStop before the stopDrag, but in the second you had them the other way around.. so you need to mix the 2.

on(press){
startDrag(this);
}
on(release, releaseOutside){
stopDrag();
_root.gotoAndStop(2);
}

Or.. whatever yours was.


Sup, bitches :)

BBS Signature
Gimmick
Gimmick
  • Member since: Aug. 20, 2008
  • Offline.
Forum Stats
Member
Level 27
Programmer
Response to StartDrag() is a problem! 2010-09-08 08:09:13 Reply

At 3/22/09 06:11 PM, liam wrote: In the first bit of code you had the gotoAndStop before the stopDrag, but in the second you had them the other way around.. so you need to mix the 2.

on(press){
startDrag(this);
}
on(release, releaseOutside){
stopDrag();
_root.gotoAndStop(2);
}

Or.. whatever yours was.

Doesn't work. Anyways, now I have a much better knowledge of flash.


Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp
"Sit look rub panda" - Alan Davies

BBS Signature