5832006--0-1-, 12. 2
My first Flash 8 experiment, playing with blendmode. So, you do need Flashplayer 8 to see what it does. Really simple. Here's the code: ============== var count = 0; var kleur = 0xFFFFFF; _root.onMouseDown = function(){ _root.createEmptyMovieClip("mc" + _root.count, _root.count); mc = _root["mc" + _root.count]; mc.blendMode = 7; mc._x = _root._xmouse; mc._y = _root._ymouse; mc.onEnterFrame = function(){ var w:Number = _root._xmouse - this._x; var h:Number = _root._ymouse - this._y; this.clear(); this.beginFill(_root.kleur,100); this.moveTo(0,0); this.lineTo(w,0); this.lineTo(w,h); this.lineTo(0,h); this.lineTo(0,0); this.endFill(); } } _root.onMouseUp = function(){ mc = _root["mc" + _root.count]; delete mc.onEnterFrame; _root.count++; } ================= The buttons top left simply change _root.kleur; (kleur = dutch for colour). Cut and past should work!
Ellen
I can still feel kinda proud i can actually write this thing from scratch. :-) Even though everyone has seen this before ofcourse... Nighty night all!
5832006--0-1-, 12. 2
My first Flash 8 experiment, playing with blendmode. So, you do need Flashplayer 8 to see what it does. Really simple.
Here's the code:
==============
var count = 0;
var kleur = 0xFFFFFF;
_root.onMouseDown = function(){
_root.createEmptyMovieClip("mc" + _root.count, _root.count);
mc = _root["mc" + _root.count];
mc.blendMode = 7;
mc._x = _root._xmouse;
mc._y = _root._ymouse;
mc.onEnterFrame = function(){
var w:Number = _root._xmouse - this._x;
var h:Number = _root._ymouse - this._y;
this.clear();
this.beginFill(_root.kleur,100);
this.moveTo(0,0);
this.lineTo(w,0);
this.lineTo(w,h);
this.lineTo(0,h);
this.lineTo(0,0);
this.endFill();
}
}
_root.onMouseUp = function(){
mc = _root["mc" + _root.count];
delete mc.onEnterFrame;
_root.count++;
}
=================
The buttons top left simply change _root.kleur;
(kleur = dutch for colour).
Cut and past should work!
Ellen