Jump to content
Search Community

Simple scrollRect reveal, what am I doing wrong? [SOLVED]

X10 test
Moderator Tag

Recommended Posts

Hi All,

I've just got back into AS3 & Flash, and Greensock of course, but I'm having some trouble with the scrollRect Plugin.

 

I have an mc on stage that I want to 'reveal' from the bottom upwards, if that makes sense.

However whatever I try with the scrollRect plugin I can't seem to get right!

 

It would be the opposite of this:

 

TweenLite.from(mc, 4.5, {scrollRect:{ y:0, bottom:-mc.height}});

 

Using the above code, the reveal comes from the top, but I want it to come from the bottom.

Any advice on values greatly appreciated!

 

X10

Link to comment
Share on other sites

Hey X10,

 

nice to see you around. glad you solved it and thanks for posting your solution.

 

scrollRect is great, but I've found that it naturally only allows the direction of the reveal to work in specific ways. changing the reg point was a clever approach.

Link to comment
Share on other sites

Hi Carl,

Thanks for the welcome.

 

I think scrollRect would be a good subject for a tutorial, it has baffled me how it works, I had to play with it for ages before I tried changing the registration point. I still don't understand the logic of Top, Bottom, x, y etc., I only figured it out through trial and error.

The documentation for it could be more comprehensive I think, or at least some examples with explanation.

Link to comment
Share on other sites

... it has baffled me how it works, I had to play with it for ages before I tried changing the registration point. ...I only figured it out through trial and error.

 

me too!

 

I know I have a file laying around somewhere that I used for experiments. If I find it i'll try to make something helpful out of it.

 

-c

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...