sandesh Posted September 2, 2010 Share Posted September 2, 2010 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 More sharing options...
GreenSock Posted September 2, 2010 Share Posted September 2, 2010 Could you clarify your question a bit? Are you saying you want to tween the width/height but have those values only based on the visible size of the object instead of the actual dimensions Flash reports (including invisible objects and masks)? Link to comment Share on other sites More sharing options...
sandesh Posted September 2, 2010 Author Share Posted September 2, 2010 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 More sharing options...
GreenSock Posted September 2, 2010 Share Posted September 2, 2010 It's a tricky problem to be sure, but I'd highly recommend looking at AutoFitArea - it has a "calculateVisible" parameter in the attach() method that may be very helpful for you. http://www.greensock.com/autofitarea/ Link to comment Share on other sites More sharing options...
sandesh Posted September 7, 2010 Author Share Posted September 7, 2010 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 More sharing options...
GreenSock Posted September 7, 2010 Share Posted September 7, 2010 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now