I`m workin on a cd-rom project about art analysis, paintings, artists, bla bla.
It is for a teacher that will use it in his classes.
[color=red]I need to learn how to simulate a blackboard, that he could click and paint on some parts of the paintings.[/color]
Does anyone know a tutorial about that?
:thumb:
perfect!
I didnt look for it at Kirupa!
Thanks
*Originally posted by Felipe Bastos *
**perfect!
I didnt look for it at Kirupa!
Thanks **
:!: :!: :!:
You didn’t look for it at Kirupa!!!
:!: :!: :!:
[size=1]::stares gazingly down at my footer[/size]
hehehe
Thanks also to ahmed!
This will be also usefull!
:):)
How can I set limits?
top 20
bottom 400
left 0
right 420
here’s how i did a while back:
this.onEnterFrame = function() {
if (_xmouse>271) {
lineTo(271, _ymouse);
} else if (_xmouse<30) {
lineTo(30, _ymouse);
} else if (_ymouse<45) {
lineTo(_xmouse, 45);
} else if (_ymouse>225) {
lineTo(_xmouse, 225);
} else {
lineTo(_xmouse, _ymouse);
}
};
there might be a better way though… im not really sure
You are pretty fast!
zooooooooooooooooooooom
Thanks :thumb:
system
June 9, 2003, 4:40am
11
You could also try setMask if you wanted to…
Add this after _root.createEmptyMovieClip(“line”, 1);
[AS]_root.createEmptyMovieClip(“mask”, 2);
mask.beginFill(0x000000, 100);
mask.moveTo(20, 0);
mask.lineTo(20, 420);
mask.lineTo(400, 420);
mask.lineTo(400, 0);
line.setMask(mask);[/AS]
I didn’t test it, but yeah…lol.
system
June 9, 2003, 4:40am
12
Hey ahmed!
Would u mind sharing your knowlogy and tell me how to use cookies like u do with … your thing to draw, I forgot the name of this thing!??
system
June 9, 2003, 4:43am
13
hey lost, i think you’re way’s way better (doesn’t have to go through 4 if’s) …
and… here’s a tutorial on shared objects: flash mx cookies
system
June 9, 2003, 4:48am
14
Thanks again ahmed
My boss will love this!
system
June 9, 2003, 4:49am
15
ahmed: I honestly don’t know which method is better, yours has to go through 4 if statements, but mine still draws content outside of the border, which still uses up resources.
So hmmm.
system
June 9, 2003, 4:59am
17
*Originally posted by lostinbeta *
**ahmed: I honestly don’t know which method is better, yours has to go through 4 if statements, but mine still draws content outside of the border, which still uses up resources.
So hmmm. **
hmmmm…
*Originally posted by Felipe Bastos *
**The mask did not work!
**
it does work, but you will have to draw within a movieclip called ‘line’
createEmptyMovieClip("line", ++depth)
createEmptyMovieClip("mask", ++depth)
mask.beginFill(0x000000, 100);
mask.moveTo(20, 0);
mask.lineTo(20, 420);
mask.lineTo(400, 420);
mask.lineTo(400, 0);
line.setMask(mask);
line.lineStyle(0)
line.onMouseDown = function() {
this.moveTo(_xmouse, _ymouse)
this.onEnterFrame = function() {
this.lineTo(_xmouse, _ymouse)
}
}
line.onMouseUp = function() {
delete this.onEnterFrame
}
or something like that
system
June 9, 2003, 5:18am
18
A black background is created and it does not work as a mask!
system
June 9, 2003, 5:21am
19
It worked for me…
I did this…
[AS]// 1. SETTING THINGS
_root.createEmptyMovieClip(“line”,1);
_root.createEmptyMovieClip(“mask”, 2);
mask.beginFill(0x000000, 100);
mask.moveTo(20, 0);
mask.lineTo(20, 420);
mask.lineTo(400, 420);
mask.lineTo(400, 0);
line.setMask(mask);
// 2. EVENTS IN _ROOT:
_root.onMouseDown = function(){
line.moveTo(_xmouse,_ymouse);
line.lineStyle(2,0x000000,100);
this.onMouseMove = function(){
line.lineTo(_xmouse,_ymouse);
updateAfterEvent();
}
}
_root.onMouseUp = function(){
this.onMouseMove = null;
}[/AS]
ahmeds method created 2 clips on the same level, you can’t do that, the new one overwrites the old one.
system
June 9, 2003, 5:21am
20