Copy link to clipboard
Copied
Hello,
I have a drag and drop with target, m1h1.swf, and I want to load this swf on a mainmenu.
The loadmovie is works, the movie clip is drag-able, but not drop-able on the target.
Here is the script on one movie clip.
on (press)
{
if (!this.isLocked)
startDrag(this);
}
on (release) {stopDrag();
if(this._droptarget=="/anak1" && _parent.tongkatanak1 == false)
{
this._x=193,75;
this._y=358,90;
var efeksound:Sound = new Sound();
efeksound.attachSound("plopp");
efeksound.start();
var isLocked = true;
_parent.tongkatanak1 = true;
}
else if(this._droptarget=="/anak1" && _parent.tongkatanak1 == true)
{
this._x=600,20;
this._y=342,8;
}
else if(this._droptarget=="/anak2" && _parent.tongkatanak2 == false)
{
this._x=323,75;
this._y=358,90;
var efeksound:Sound = new Sound();
efeksound.attachSound("plopp");
efeksound.start();
var isLocked = true;
_parent.tongkatanak2 = true;
}
else if(this._droptarget=="/anak2" && _parent.tongkatanak2 == true)
{
this._x=600,20;
this._y=342,8;
}
else if(this._droptarget=="/anak3" && _parent.tongkatanak3 == false)
{
this._x=453,75;
this._y=358,90;
var efeksound:Sound = new Sound();
efeksound.attachSound("plopp");
efeksound.start();
var isLocked = true;
_parent.tongkatanak3 = true;
}
else if(this._droptarget=="/anak3" && _parent.tongkatanak3 == true)
{
this._x=600,20;
this._y=342,8;
}
else
{
this._x=600,20;
this._y=342,8;
}
}
Have something to add?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now