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...
I have tried this but every time I draw a gradient, it makes a left to right fill ( not a vertical one ) and when you rotate it, it gets all out of shape ! It would help if you could tell me how to constrain the gradient to draw vertically....
Here is a link to a file that demos how to do it with 2 movieclips and three lines of code.
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.
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:
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 ?
Yes, my file does not use a mask layer, it uses code to create the mask, much like your searching led you to already. Your gradient should consist of a shape with either either a radial or linear gradient using the same color across it, but one end of it is set to an alpha value of 0.
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
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
Europe, Middle East and Africa