View Full Version : can this be achieved with AS?
tinyk
06-21-2004, 03:59 PM
www.project13.com
( the way the photos are revealed ) i know how to do this manually, but is there a way to do this with AS?
senocular
06-21-2004, 04:09 PM
yes
tinyk
06-21-2004, 04:21 PM
would i need to draw a box (with fill), then set that annimation as the mask to the photo?
petefs
06-21-2004, 04:42 PM
bingo ^_^ the syntax is
myMC.setMask(myMask);
where myMC is the instance name of the movieclip you want to mask -- and myMask is the instance name of the movieclip you want to use as a mask ^_^
tinyk
06-21-2004, 05:19 PM
i've got the setMask stuff down, i've just never used drawing API (by the way, what does API stand for?).
in looking at some of the tutorials, the part i'm a little perplexed about is the lineTo stuff. sometimes there are four lineTo's, sometimes three, etc. what points go with what lineTo?
for instance,
lineTo (a, b);
lineTo (c, d);
lineTo (e, f);
etc...
what would the a, b, c, d be? is it clockwise? counterclockwise?
petefs
06-21-2004, 05:44 PM
API stands for Application Programming Interface.
You don't need to use the drawing API to achieve the effect on the site you listed. You could simply make an animation in an MC and use instances of that to mask the images you load in.
To answer your question, however:
lineTo draws a line from the current point to the point specified by the two arguments. For example, to draw a simple triangle:
moveTo(200,200);
lineTo(300,300);
lineTo(100,300);
lineTo(200,200);
You'll find a few answers to your questions in the help docs provided in the flash authoring environment : )
As to clockwise/counterclockwise, you don't need to do things in any particular order (other than the order that draws the right shape :b) but it's a good practice to think of things in that manner. Most people draw clockwise, but whatever you feel comfortable with ^_^
The above example could be done a variety of ways, but if you're going to be filling the shape that's drawn it's best to use consecutive lineTo's like that.
tinyk
06-21-2004, 05:49 PM
Thanks!! I really appreciate it!!
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.