Jump to content
Search Community

Simple question about Panning

CarlosCC test
Moderator Tag

Recommended Posts

Hey everyone,

 

I got a question regarding zooming/panning, could anyone please explain me how can I achieve something like this?

 

http://megaswf.com/serve/74028/ (there's 2 banners there, I'm talking about the bottom one)

 

I was trying with Timeline and append, but I'm not too sure about how to proceed to achieve the effects like that banner, I need to do a banner similar to the one I'm posting, with a simple image, and just panning, pausing, and zooming in certain spots, any help will be greatly appreciated.

 

Thanks in advance. =)

Link to comment
Share on other sites

Thanks for your quick reply =)

 

But I got another question, how do you pause the animation? I'm new into this and I want to learn so bad lol. I would appreciate if you could give me a little push to start the banner... like... if I want to tween from X to Y I use:

 

myTimeline.append(new TweenLite(mc, 2, {x:20}));

 

For example... and if I want to pause it right there for a few secs what do I write? and then I want it to zoom into a certain spot, what do I put there? that's all I need to get to work, thanks again. :oops::?

Link to comment
Share on other sites

Hey I thought I had it... but apparently not, this is my issue now:

 

I got 1 vertical image, I want that image to pan Y to the center, stop, then pan to the bottom.

 

So it pans down to the middle... everything's ok, it stops for a few secs, then when it goes to the bottom part it starts bouncing up and down very slowly and stays there just bouncing... I'm lost I don't know what to do, here's the code I'm using:

 

import com.greensock.*;

 

var timeline:TimelineLite = new TimelineLite();

timeline.append( new TweenLite(mc, 5, {y:330, delay:3}) );

timeline.append( new TweenLite(mc, 5, {y:170, delay:3}) );

 

Please help :D

Link to comment
Share on other sites

Ummmm....it starts bouncing? There must be something else going on in your code because the tweening code you posted most definitely would NOT cause that behavior. If you still need help, please post a simple example FLA that demonstrates the issue so we can publish it on our end and see the problem.

Link to comment
Share on other sites

Aha! The problem is that you didn't put a stop() action on your root timeline and you added 60 frames. So since it's running at 30fps, that means the playhead moves along the timeline for 2 seconds and then when it reaches the end, it loops back to the beginning and starts playing again from frame 1. Frame 1 is where you have your tweening code! So it re-runs that code every 2 seconds, recreating the tweens and running them from whereever the object happens to be at that time. See the logic problem? It has nothing to do with a TweenLite/Max issue - it's just how you set up your FLA.

 

Either delete all the extra frames or add a stop() to frame 1 and you'll be fine.

Link to comment
Share on other sites

From reading some stuff in your website I know your name's Jack, Jack... you're the man ! Thank you very very much, seriously, I really appreciate how you answer so quickly and all the effort you put on this tools and share them with people, have a good day ! =)

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