
Код AS1/AS2:
var g:Number=0;
currentThumb.onRelease = function(){
while (image_mc_2.getInstanceAtDepth(g) != undefined) {
g++;
}
currentImage = image_mc_2.createEmptyMovieClip("imagenail"+g,image_mc_2.getNextHighestDepth ());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc) {
trace(target_mc);
trace(currentImage);
currentImage.onPress = function() {
this.startDrag();
this.onRelease = function() {
this.stopDrag();
}
btn_scale_plus.onRelease = function() {
target_mc._xscale = target_mc._yscale += 1;
}
btn_scale_minus.onRelease = function() {
target_mc._xscale = target_mc._yscale -= 1;
}
btn_rotate_left.onRelease = function() {
target_mc._rotation-= 1;
}
btn_rotate_right.onRelease = function() {
target_mc._rotation+= 1;
}
btn_delete.onRelease = function() {
image_mcl.unloadClip(target_mc);
trace(target_mc.getDepth());
}
btn_position_down.onRelease = function() {
mx.behaviors.DepthControl.sendToBack(target_mc);
}
btn_position_up.onRelease = function() {
mx.behaviors.DepthControl.bringToFront(target_mc);
}
btn_alpha_minus.onRelease = function() {
target_mc._alpha-= 5;
}
btn_alpha_plus.onRelease = function() {
target_mc._alpha+= 5;
}
trace(target_mc.getDepth());
}// end of currentImage.onPress
}// end of mclListener.onLoadInit = function(target_mc:MovieClip)
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(baseurl + this.IMAGE, currentImage);
}//end of currentThumb.onRelease