Flash Scratch Off
- Started
- Last post
- 8 Responses
- kStyle
Has anyone seen a tutorial or guide (or many even the code ;) ) for something like this in Flash
http://www.shocksites.com/openSo…
Thanks in advance
- MX_OnD0
use setMask(); or similar...
I'll try to dig a little...
- MX_OnD0
ok so what you want to do is
1. set a movieclip as a mask with movieClip.setMask() then attach movie clips to it.
2. create an emptyMovieClip and use the drawing API to draw onto the mask....
- kStyle0
Yes, I figured setMask . . . I am more unsure about the trail. . .Duplicating mcs seems a bit much? . . . And knowing if underneath layer has been reveal a certain precentage. . .
- MX_OnD0
as far as duplicating mcs goes I wouldn't worry as long as you set your interval high enough.
knowing whether the layer beneath has been revealed or not is irrelevant as _alpha = 200 gives the same reult as _alpha = 100.
The best solution is definitely to use the drawing API and have the player do it all, what you'll need to do is to create a circle with the drawing API and call that function every however often..
- kStyle0
thanks a lot
your help is much appreciated
would have been fun in the scottish accent
- MX_OnD0
thanks a lot
your help is much appreciated
would have been fun in the scottish accent
kStyle
(Apr 8 05, 16:44)Aye weel lassie that's just the way the scrotum swings, ken?
Ah've goat a fucken-aboot accent an' a profeddional wan as weel, ken?
*but seriously you're most welcome.
*jist dinnae go tellin folk Ah'm helpful ;)
- kStyle0
damn it!
so close!
what am i doing wrong here??
_root.createEmptyMovieClip("line...
_root.onMouseDown = function(){
line.moveTo(_xmouse,_ymouse);
line.lineStyle(30,0x000000,100);this.onEnterFrame = function(){
line.lineTo(_xmouse,_ymouse);
}
}test_mc.setMask(line);
_root.onMouseUp = function(){
this.onEnterFrame = null;
}---- I am trying to mask test_mc by making the mc "line" mask. . . . I get a blank screen. . .drawing in the "line" worked prior to putting in setMask() ???
- MX_OnD0
2 things,
don't use onEnterFrame, use setInterval instead, it's the preferred method.
and
try setting the mask within the function that draws your line.
(you'll need to make one in order to use setInterval anyway.)