This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > May 2005 > Clipping an SWF





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Clipping an SWF
Flanders_ZA

2005-05-30, 7:33 am

Hi,

I'm doing a monthly update to a site that requires a new SWF each time. My
problem is that because of tweens and things that exceed the boundaries of the
'stage area', I have to revert to clipping all the unwanted visible objects
after I'm done animating etc. otherwise these objects are seen in the site
itself. In order to hide these remnants, I've had to create a mask with my
desired viewing area punched out of the middle, and then convert everything to
key frames, remove tweens, break apart, merge mask onto layer, delete, repeat
for EVERY frame. This doesn't seem very practical. Luckily, in this case, the
background is a standard one colour affair, so I could simply leave the mask in
place and that should solve the problem but I'm wondering (and I'm a scripting
moron), is there a way to clip an SWF's X and Y through scripting?

To clarify what I'm saying... an SWF, when played standalone uses the correct
X and Y dimensions (those that were assigned in the .fla) but when inserted
into a larger .fla, the cropped elements become visible once again.

merlinvicki

2005-05-30, 7:33 am

hi Flan,
u could use loading ur swf into a movieclip and then change the _x and _y
co-ordinates of the loaded file to less than zero so as ur extra area is no
more visible. Normally the loaded movie will have 0,0 as co-ordinates so making
it something like -100 ,-100 would clip off the area u want to hide. Rem to
keep the movieclip the exact size u want ur animation.

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews