publikum
%Europe/Berlin %681 %2008, 16:20
ik heb een simpel scriptje gemaakt om twee items te kunnen verplaatsen over het beeld. nu wil ik dat wanneer ik het ene item versleep naar het andere item hij het onderliggende item verplaatst naar de oude locatie van het item wat ik probeer neer te zetten op de locatie van item 2. Ik hoop dat ik het zo duidelijk uitleg.
script:
item1._x = 40;
item1._y = 40;
item2._x = 150;
item2._y = 40;
item1.onRelease = function(){
this.stopDrag();
}
item1.onPress = function(){
this.startDrag();
this.swapDepths(this.getNextHighestDepth());
}
item1.onReleaseOutside = function(){
item1.stopDrag();
}
item2.onRelease = function(){
this.stopDrag();
}
item2.onPress = function(){
this.startDrag();
this.swapDepths(this.getNextHighestDepth());
}
item2.onReleaseOutside = function(){
item1.stopDrag();
}
script:
item1._x = 40;
item1._y = 40;
item2._x = 150;
item2._y = 40;
item1.onRelease = function(){
this.stopDrag();
}
item1.onPress = function(){
this.startDrag();
this.swapDepths(this.getNextHighestDepth());
}
item1.onReleaseOutside = function(){
item1.stopDrag();
}
item2.onRelease = function(){
this.stopDrag();
}
item2.onPress = function(){
this.startDrag();
this.swapDepths(this.getNextHighestDepth());
}
item2.onReleaseOutside = function(){
item1.stopDrag();
}