I am trying to make a layer in a file appear gradually from bottom to top ( like a pile of sand grows as you pour on more sand ). What I mean by this is that I know I could use a transform tween but that is like a growing taller rather than a building gradually from the base. Does that make sense ?
I have tried everywhere and the tut's for grqadient masks are awful. Does anyone know where I can get a good tut on this ?
I want to do it without AS ! I am afraid giving AS to me is like giving whisky to the er, native americans; that's as PC as you're going to get...
Thanks,
TL.
Here is a link to a file that demos how to do it with 2 movieclips and three lines of code.
http://www,nedwebs.com/Flash/AS3_gradient_mask2.fla
As far as taming gradients go, there is a gradient tool in the set of tools that you can use to modify the direction and other aspects of a gradient. It shares space with the Free Transform Tool, so if you press down on that tool both should appear such that you can select the gradient tool.
Okay.
1. Ned, I couldn't open the link that you gave above.
2. I found a work around to create a nice graduated mask ( because I couldn't figure out the gradient tool). I created it in PS and imported it to the stage !
3. I made both the maskee and the mask into movie clip symbols and checked the 'cacheasbitmap' button.
4. As you can see, the mask still appears as a hard line rather than a soft fade.
5. After some checking online, I discovered that Flash can't really see a mask as a soft fade without AS.
6. I added
mask_mc.cacheAsBitmap = true;
me_mc.cacheAsBitmap = true;
me_mc.mask = mask_mc;
as instructed but the animation still appears as a harsh line. What am I doing wrong ?
an see the file:
https://docs.google.com/file/d/0B-cQQhdwl3C-WjVtNmRzRHE0OWM/edit
I have a typo in that link... the comma should be a period. I cannot tell what you have acquired from photoshop, but it might not be what you think it is - it could be a solid image regardless that you might not see part of it.
You should resolve how to create the gradient in Flash and use that.
Ned, I took your advice and created a new gradient in Flash and inserted the same code ( with the instance names chaged of course ). However, it still appears as a harsh line instead of a gentle fade. I looked at your file. Mine is the same. At this point, it moves as a nice fade effect. But yours, like mine, turns into a hard line if you turn the gradient into a mask layer. How do I make the mask reperesent the gradient that it is ?
Regards,
TL.
As far as I can see, that is what I have done also. But in both yours and my file, the effect is a harsh line as opposed to a creeping fade. I tried to follow the tut seen here: http://www.youtube.com/watch?v=U5RtkhmkilM but mine just doesn't have the same effect. I tried changing the 'cache as bitmap' button on and off in the properties ( thinking that maybe the AS was clashing with it) but it made no difference either way !
My file can be viewed here: https://docs.google.com/file/d/0B-cQQhdwl3C-NUNIV1BNS0JFR0U/edit
Regards,
TL.
I've just had a look at the tut again and I realised that I had it done correctly. The problem ( if we can call it that ) is that it won't show you the full effect in a timeline scrub. However, when I run a test swf you see the soft edge. You just don't get a wisiwig in the timeline.
Phew, that's a relief.
Future note to self ( and others ): run regular test swf's - you may have done things that you didn't realise !
here is my file with the rather pretty soft edge mask fade: https://docs.google.com/file/d/0B-cQQhdwl3C-TWZOUWpQSzZTVGc/edit
Regards,
TL.
North America
Europe, Middle East and Africa
Asia Pacific