Однажды кто-то на форуме оставил этот монускрипт=)
Код:
Stage.align="TL";
Stage.showMenu=false;
Stage.scaleMode="noScale";
//
Stage.addListener(o=_global.mouseController=_level0.createEmptyMovieClip("$$$MOUSE$$CONTROLLER$$",-16381));
o.f=function(w,h){with(this){
_x=_y=0;
lineStyle(0,0,0);beginFill(0,0);
lineTo(w,0);
lineTo(w,h);
lineTo(0,h);
endFill();
};};
o.onResize=function(){this.f(Stage.width,Stage.height);};o.onResize();
addProp=function(o,p,f){o.addProperty(p,function(){return o[p];},f);};
addProp(o,"mouseOver",function(mouseOver){trace((mouseController.txt.text=(mouseOver)?("[мышка во флэшке]"):("[мышка вне флэшки]")));});
o.useHandCursor=false;
o.createTextField("txt",0,0,0,0,0).autoSize=true;//
p=function(o,m,f,n){o[m]=function(){f();this[n]();trace(n);}};
pr=function(o,m,f){for(var i=0;i<o.length;i++){for(var i2=0;i2<m.length;i2++){p(o[i],m[i2],f,(m[i2].charAt(2).toLowerCase()+substring(m[i2],4,m[i2].length-2)));};};};
o=[MovieClip.prototype,Button.prototype];
pr(o,["onRollOver"],function(){_global.mouseController.mouseOver=true;});
pr(o,["onDragOver"],function(){_global.mouseController.mouseOver=true;});
pr(o,["onRollOut"],function(){_global.mouseController.mouseOver=false;});
pr(o,["onDragOut"],function(){_global.mouseController.mouseOver=false;});
pr(o,["onReleaseOutside"],function(){_global.mouseController.mouseOver=false;});
pr(o,["onPress","onRelease"]);
//
attachMovie("myButton","but",0).stop();
but._x=but._y=200;
but.rollOver=function(){trace((this.text="навели на"+this));this.gotoAndStop(2);};
but.releaseOutside=function(){this.gotoAndStop(2);};
but.rollOut=function(){trace((this.text="отвели от"+this));this.gotoAndStop(1);};
but.press=function(){trace((this.text="нажали на"+this));};
but.release=function(){trace((this.text="отжали "+this));};
|