Jump to content
Search Community

Sliding image continuously with constrained display area

LanLing test
Moderator Tag

Recommended Posts

I want to create a very simple slideshow of images that loops continuously when it reaches the last image, or the last section of the image, however I need to constrain the display area of the slideshow. I cannot use images above the slideshow to cover it up, because the overlay I'm using is semi-transparent, therefore the slideshow image will still peek out from underneath it.

This is what I mean:

 

qpHom.png

 

So the only way I can think of is to constrain the actual display area. Does anyone know how I would do this?

For the sliding, I know I can just tween it directly in Flash. However I was wondering if TweenLite/Max has some easier way of looping it, so when it gets to the max x coordinate of the image (right end of image), it will loop again from the leftmost side of the image.

Thanks.

Link to comment
Share on other sites

have you tried using a mask? instead of using a layer mask in Flash I would recommend using AS3:

 

http://www.republicofcode.com/tutorials/flash/as3masking/

 

give that tutorial a read. the only difference is that your mask isn't moving, the object being masked is.

 

GreenSock makes a very powerful tool called BlitMask which is a "high-performance" mask. I would suggest you start small with a basic mask first.

Link to comment
Share on other sites

Thank you. Using a mask worked. However now I want the mask to be an irregular shape. When I import a png image to use as a mask, flash only uses the rectangular area as the mask, not the image itself.

This is what I mean:

yPCDH.png

 

The slanted oval is the mask area I want, however Flash only uses the enclosing rectangle for the mask. How do I use the oval as the mask only? Thanks.

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