Kod: Zaznacz cały
function onMouseDown ():Void {Kod: Zaznacz cały
function onMouseDown ():Void {Kod: Zaznacz cały
var intervalID:Number;
var mouse_list:Object = {};
mouse_list.onMouseDown = function() {
intervalID = setInterval(foo, 100, "cos");
};
mouse_list.onMouseUp = function() {
clearInterval(intervalID);
};
Mouse.addListener(mouse_list);
function foo(arg:String):Void {
trace(arg);
}Kod: Zaznacz cały
var pusty_mc:MovieClip = this.createEmptyMovieClip(pusty_mc, this.getNextHighestDepth());
var newObj:Object = new Object();
tlo.setMask(pusty_mc);
function onMouseDown ():Void {
newObj._x = _xmouse;
newObj._y = _ymouse;
pusty_mc.attachMovie("kolo", "kolo"+pusty_mc.getNextHighestDepth(), pusty_mc.getNextHighestDepth(), newObj);
}
Kod: Zaznacz cały
var new_depth:Number;
var new_name:String;
var pusty_mc:MovieClip = this.createEmptyMovieClip("pusty_mc", this.getNextHighestDepth());
pusty_mc.onMouseDown = function() {
this.onMouseMove = dodaj;
};
pusty_mc.onMouseUp = function() {
delete this.onMouseMove;
};
function dodaj():Void {
new_depth = pusty_mc.getNextHighestDepth();
new_name = "kolo" + new_depth;
pusty_mc.attachMovie("kolo", new_name, new_depth, {_x:_xmouse, _y:_ymouse});
updateAfterEvent();
}Kod: Zaznacz cały
var pusty_mc:MovieClip = this.createEmptyMovieClip(pusty_mc, this.getNextHighestDepth());
var newObj:Object = new Object();
tlo.setMask(pusty_mc);
pusty_mc.onMouseDown = function() {
this.onMouseMove = dodaj;
};
pusty_mc.onMouseUp = function() {
delete this.onMouseMove;
};
function dodaj():Void {
new_depth = pusty_mc.getNextHighestDepth();
new_name = "kolo"+pusty_mc.getNextHighestDepth();
newObj._x = _xmouse;
newObj._y = _ymouse;
pusty_mc.attachMovie("kolo", new_name, new_depth, newObj);
updateAfterEvent();
}