Jump to content
Search Community

Masking Problem

sandesh test
Moderator Tag

Recommended Posts

Hi Jack,

 

I have a movieclip in which there are several masks which are animated. Some of these animated masks are also halfway outside the boundaries of the parent movieclip. Now when i resize the parent movieclip from outside it considers the overall width and height of the parent movie clip, which also includes the invisible areas of the mask inside the parent movieclip. How can i make the parent movie clip to NOT consider the invisible areas of the mask and only consider the actual width and height of the parent movie clip.

 

Can Tweenlite or any of your other tweening engines can help solve this problem. Thanks

Link to comment
Share on other sites

Actually the scenario is like this:

 

I am resizing a background image according to browser window size. This background image is a movieclip which has got several masked animations in it. But most of the animations are on the border of the background image which increases the width and height of the background movieclip. Now even if visually all the animations plays within the boundaries of the background image, the invisible part of the animations which are outside the boundaries are also considered, which increases the width and size of the background image. This in turn affects the resizing of the background image

Link to comment
Share on other sites

Thanks Jack,

 

The AutoFitArea class solved my problem. But now I have come across a new problem.

The movieclip which i attach does not tween its alpha and comes directly. Here's my sample code which i have been using.

Pls tell me where i am going wrong:

 

_area:AutoFitArea
_indianStyle = new IndianStyle
SectionPage.instance.bgContainer.addChild(_indianStyle)
_area = new AutoFitArea(SectionPage.instance.bgContainer, 0, 0, 1280, 768)
_area.attach(_indianStyle, ScaleMode.STRETCH, AlignMode.LEFT, AlignMode.TOP, false, 0, 999999999, 0, 999999999, true)
_indianStyle.alpha = 0
TweenLite.to(_indianStyle, 1, { alpha:1, ease:Expo.easeOut } )

 

 

In the above code, the _indianStyle movieclip does not tween and comes directly. Pls help..

Link to comment
Share on other sites

There must be something else going on in your code/FLA. Maybe indianStyle contains a TextField and the fonts aren't embedded? Or maybe you're subloading something inside indianStyle and it takes longer to load than the alpha tween, so it just appears to come in at alpha:1 even though the tween is working fine? Very tough to tell without seeing your file(s).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...