2 Replies - 9003 Views - Last Post: 13 February 2010 - 09:02 PM

#1 evilkitty75   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-February 10

Drag n Drop Macromedia Flash 8

Posted 13 February 2010 - 11:48 AM

Hello all, I am kiki nice to meet you.
I am having a problem in flash 8 with code
I am making a drag n drop game, everytime input this code~
on (press) {
startDrag (this, true);
}
on (release) {
stopDrag ();
}

It didnt work,
then i tried this~

on (press) {
startDrag ("")
dragging = true
}
on (release,releaseOutside) {
stopDrag ()
dragging = false
}
it 2 did not work,
I am told it is in error and u can only apply it
to buttons. this is driving me nuts
Please i dont want you to do it for me but i would like
a clue as to what im doing wrong?
the dragable pieces are all saved as movie clips
button's are of no use as i dont want buttons.
Thankyou in advance


Is This A Good Question/Topic? 0
  • +

Replies To: Drag n Drop Macromedia Flash 8

#2 BetaWar   User is offline

  • #include "soul.h"
  • member icon

Reputation: 1651
  • View blog
  • Posts: 8,523
  • Joined: 07-September 06

Re: Drag n Drop Macromedia Flash 8

Posted 13 February 2010 - 07:59 PM

Try something like so:
var mc = m;
mc.onPress = function(){
	this.startDrag();
}
mc.onRelease = function(){
	this.stopDrag();
}


Where m is the instance name of the movieclip that you want to apply drag and drop to.

NOTE - This goes on the stage's actions layer.

Hope that helps.
Was This Post Helpful? 1
  • +
  • -

#3 evilkitty75   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-February 10

Re: Drag n Drop Macromedia Flash 8

Posted 13 February 2010 - 09:02 PM

View PostBetaWar, on 13 February 2010 - 06:59 PM, said:

Try something like so:
var mc = m;
mc.onPress = function(){
	this.startDrag();
}
mc.onRelease = function(){
	this.stopDrag();
}


Where m is the instance name of the movieclip that you want to apply drag and drop to.

NOTE - This goes on the stage's actions layer.

Hope that helps.

Heya sweety thankyou i figured it out 2 hours ago :snap: lol n the code was right the 1st but i was inputtin it wrong lol thankyou for your help babes
i did this in the end
on(press){
startdrag("");
}
on(release){
stopDrag();
}
n it worked
:hungry:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1