actionscript 3 - Flash as3 image slider -


I'm trying to get an image slider to work properly. But I do not get the next / previous operating system to work.

I have a container MC that holds all the images, and a mask that acts as a mask for that container.

How do I add images here

 for  (var i: int = 0; i  

So all the images are now located in good queues for some extent, masks and containers have the same X / Y-position, so now say that I will show 5 containers of containers To set the subtlety of the mask.

How do I program the next / previous button so that it displays or hides a single image on the click? like. It looks right in the middle of the container position.

This is my next and previous function is not working with I basically I want the container to always show the quantity of the same items.

  Private function slide left (Event: Mouse Event): Zero {if (! TweenMax.isTweening (container)) {var tx: number = Math.man (container.x + item, _mask. X); TweenMax.to (container, 0.3, {x: Math.floor (tx)}); }} Private function slide right (Event: Mouse Event): Zero {if (! TweenMax.isTweening (Container)) {var tx: number = Math Max (container.x - itemwhether, _mask.x-_mask.width); TweenMax.to (container, 0.3, {x: Math.floor (tx)}); }}  

What's wrong? to anyone?

When you need an account for the width of the container while showing the item to the right, the minimum for the container X value should be _mask.x - (container_width_mask.width)

You must have an account for margin or you will see offset you have described in your comment.

Private function slide lift (Event: Mouse Event): zero {if (! TweenMax.isTweening (container)) {var tx: number = Math (Container.x + (Madadhda + margin), _mask.x); TweenMax.to (container, 0.3, {x: Math.floor (tx)}); }} Private function slide right (Event: Mouse Event): Zero {if (! TweenMax.isTweening (Container)} {var tx: number = Math.Max ​​(container.x - (Item + margin), _mask.x - (Container Width - _mask_width); TVNmx.Too (container, 0.3, {x: Math Floor (tx)}}}

Good luck!


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -