|
|
 |
RE: FN-FORUM: ActionScript LoadMovie, then SetMask to Perform Gradient Mask technique
date posted 20th June 2007 08:11
Daniel,
I assume the "Graphic" that's appearing is the mask...?
2 things sound wrong - your positioning of MovieClips is out and if the =
mask MC is visible, then your mask is not working - which will be =
targeting I expect.
When loading a movie externally the centre point will be top right I =
believe, meaning you may have to reposition MovieClips so they match.
What version of Flash are you using?
I've had issues with MX 2004 whereby I had to fudge masking by creating =
the loaded image in another MovieClip, so =
mc.loadedImage.loadMovie("pic.jpg"), then create your mask as before but =
then mc.loadedImage.setMask(mask);
Also try removing "mask.cacheAsBitmap =3D true;" - see what happens.
Just read the title - please explain "Perform Gradient Mask technique". =
Masks can't be gradients - only solids.
Peter.
-----Original Message-----
From: Daniel Grant [EMAIL REMOVED]
Sent: 14 June 2007 10:39
To: FN-FORUM / [EMAIL REMOVED]
Subject: FN-FORUM: ActionScript LoadMovie, then SetMask to Perform =
Gradient Mask technique
Hey guys,
Id thought I'd pick someone's brains about this problem that I have.
For all you people that are trained in the art of the ActionScript!!!
I am trying to perform a gradient mask effect, which I have successfully =
done as the following.
mc.cacheasBitmap =3D true;
mask.cacheAsBitmap =3D true;
mc.setMask( mask );
This works fine in hardcoding, but as we all know, no client should get =
anything hardcoded, so I have made it dynamic by loading an external jpg =
using loadmovie like this.
mc.loadMovie("pic.jpg");
mc.cacheasBitmap =3D true;
mask.cacheAsBitmap =3D true;
mc.setMask( mask );
When I execute the latter piece of code, it just shows the graphic above =
the picture and no masking effect happens. Could someone please give any =
advice.
Thankx.
Daniel Grant
www.danielgrant.co.uk
--
Freelancers, contractors earn more with Prosperity4 Call 0870 870 4414 =
or visit www.prosperity4.com and benefit from Inland Revenue approved =
expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|