Actionscript 3 :: Infinite Horizontal Scroll At Constant Speed Using TweenLite?
Jan 24, 2012
I need to do an endless horizontal scroll of elements within a parent MovieClip.No matter what ever method I try, an element of 'drift' occurs and eventually the elements start to overlap.I've tried using relative recursive tweening for each element according but this method seems prone to quite a bit of error after repeated starts and stops.
//CODE START
function doScroll():void {
TweenLite.to(this, .25, {x:"20", ease:Linear.easeNone,onUpdate:checkPos,onComplete:doScroll});
}
//CODE END
I've reverted to doing absolute tweens to a predefined position using a contant speed. This seems to be more accurate but still some 'drift' occurs.
//CODE START
//_dest is predefined
var speed:Number = 500;
var dist:Number = this.x - _dest;
[code]....
View 2 Replies
Similar Posts:
May 29, 2008
A quick rundown of the code is I am creating movie clips that I then am trying to scroll across the screen as an infinite horizontal scroller. Here is the problem. I am able to create the effect I want using text fields, but when using movie clips and the EXACT code, it doesn't do anything. Here is the code: (sorry kinda long)
[Code]...
View 4 Replies
Aug 13, 2009
I am using a horizontal thumb scroller which i ahd acuired from the internet. the scroller works fine but the issue is, the scroll speed is directly related to teh thumbnails present.When i am having 10-20 thumbs the auto scroll is smooth. but when the thumbs increase to say 50+ even the slightest mouse movement cause the the thumb to scroll at rapid pace rendering the thumbnail scroller useless. Can anyone help me to modify the script so that i can reduces or control teh scroll speed. Or if tahts not possible how do i add a next prev button so taht i can take away the auto scroll and fwd/rewind the thumbs one by one or a batch at each click. I am attching the fla file for reference
Code:
// Developed by www.flashmo.com
var photo_filename:Array = new Array();
[code].....
View 0 Replies
May 12, 2005
In my flash page I made, in the right side, a horizontal infinite menu with a magnifying glass that has the same effect. This clip is made separately and is loaded into the page by an empty movie clip. All works well when is not in the page, but when it is loaded the lens is not moving. I figured out this problem putting this AS into the empty movie clip:
onClipEvent (mouseDown) {
startDrag("lens");
} onClipEvent (mouseUp) {
stopDrag();
}
But another problem appeared. Wherever I use the mouse, the lens are acting as if I am manipulating it. The lens are moving according to the position of the mouse. What can I do?
View 1 Replies
Jun 4, 2010
Image scrollers seem to be a popular topic on the net and not least of all here at Kirupa. anyway i have been searching for a tutorial that can give me all this:
infinite- scrolling using -dynamically loaded images in AS3 i seem to be able to find each of these qualities but they are all in different tutorials or coding lanuages, php, xml, as2, as3 .
[Code]...
View 9 Replies
Apr 20, 2009
I am trying to get an object to track my mouse on press and i am using a tween. However, the nature of the tween is such that the time taken for the object would move would always be constant despite the distance.
I would like to make the object travel at a constant speed regardless of the distance. Is it correct for me to use a tween? If not what should I be using?The code for my tween is as follows.
map_mc.tracker_mc._x = map_mc._xmouse;map_mc.tracker_mc._y = map_mc._ymouse;startx = map_mc.crosshair_mc._x;endx = map_mc.tracker_mc._x;starty = map_mc.crosshair_mc._y;endy = map_mc.tracker_mc._y;
trackTweenx = new Tween(map_mc.crosshair_mc, "_x", Regular.easeIn, startx, endx, spd, true);trackTweeny = new Tween(map_mc.crosshair_mc, "_y", Regular.easeIn, starty, endy, spd, true);
map_mc.tracker_mc is the mouse cursor that would appear when onPress while the map_mc.crosshair_mc is the object that would track my cursor's movements.
View 1 Replies
Apr 18, 2010
I am trying to write a script to move a ball MC smoothly across the stage, without using tweens. I have thus far been successful, but there is one problem: the way I have it set up, speed increases with distance! I need the speed to remain constant. I understand why, but I can't figure out what approach to take to make the speed constant.
ActionScript Code:
var speed = 100;
var newx, newy, distx, disty, speedt;[code].....
View 2 Replies
Sep 17, 2006
i know you can make something move toward the mouse with
Code:
this._x+=(_root._xmouse-this._x)/speed
but when you get closer to the mouse it slows down, is there anyway to make it do this, but not slow down when it gets closer?
View 2 Replies
Sep 13, 2009
I cannot find how to have an object follow the mouse at a CONSTANT speed. The code I keep on finding is something like this:[code]I don't know if I'm just missing some really simple detail, or some major idea, but I'm pretty sure something as easy as this is possible.
View 1 Replies
Feb 14, 2012
I have Adobe Flash CS 5 and have been having difficulties trying to get a created tween to move at a constant speed. I have been converting a graphic I've created to a symbol and turning it into a motion tween, however I have only figured out how to move the tween on a frame by frame basis. Is there a way I can map out the full trajectory of the tween and then set it to travel along that pathway at a constant speed rather than moving from point to point within a certain number of frames? The desired result is a green circle that will bounce off the edges of the computer screen/window as it moves along at a constant speed in the appropriate direction. I am a flash novice and have been fiddling with the program for a few days
View 5 Replies
Jul 7, 2009
I want to have something on the screen move at a constant speed when a button is pressed. I'm not sure how to go about it. I have this for it to move 5 pixels at a time but I want it to move continually on holding the mouse down.
on (release) {
_root.bar.ball._x += 5;
}
View 1 Replies
Sep 13, 2009
I am using Flash 8 and AS2. I have been looking and looking, but I cannot find how to have an object follow the mouse at a Constant speed. The code I keep on finding is something like this:
Code:
onClipEvent (load) {
_x = 0;
_y = 0;
speed = 5;
} onClipEvent (enterFrame) {
endX = _root._xmouse;
endY = _root._ymouse;
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
The "/speed" part makes the object move slower the closer it gets.
View 3 Replies
Sep 22, 2004
I want to move a mc with constant speed until it reaches a certain x/y value then it slows down and stop. All in as of course.
View 3 Replies
Jan 27, 2009
I have to load some external data in a text box and scroll it vertically with a constant speed. And also give link to each sentence seperatly.what i have done is scroll text vertically,but it doesn't show all the text line as text file could have many lines even 100+.
myData = new LoadVars(); //load variable frm external txt file
myData.onLoad = function() {
myText_txt.html=true;
myText_txt.text = this.myVariable;
_root.onEnterFrame = function() {
[Code] .....
What I need is to particularly link each line. And should no limitation of text in .txt file.
View 0 Replies
Oct 28, 2009
and theres probably a simple solution but i dont know. I have an object travel at a constant speed across the stage area from left to right, How do i stop it at the Right side of the stage??
View 2 Replies
Aug 15, 2011
i am create AS3 infinite scroll bar. i want to put mouseover hyperlink to every picture.
View 2 Replies
Apr 14, 2012
I am nearly finished creating the tumbler theme below. The theme uses the infinite scroll plugin and this works fine for posts that don't contain flash (photo, text, ...). Video and audio posts use flash and when the infinite scroll kicks in loading more posts it doesn't load in the flash posts. [URL]
View 2 Replies
Jul 6, 2005
I've got a question about scrolling. I would like to scroll a 100x100 mc in the y-direction (going up). I would like to scroll the same mc many times in an infinite loop. How can I scroll this mc infinitely, repeating every 40 pixels...when the _root timeline is loaded?
View 1 Replies
Jun 20, 2006
I've had a look over the numerous infinite menu threads but I can't seem to find what I'm after. I need to adapt the menu so that it will work with a left and right scroll button rather than the mouse position. I have got this working but the problem is the menu does not move with easing or inertia. This is what I need to do.
View 1 Replies
Jan 21, 2010
I am trying to make a horizontal scroll work. There is no scroll bar. I am having a long movie clip with a mask on top of that. I have two buttons on left and right ends of the mask. When I click on a button, i want the movie clip to move right or left accordingly. I want the movie clip to keep moving when the button is in 'press and hold' state. So when the button is released, the movie clip should stop moving. It keeps moving until the very end of the movie clip.The name of the movie clip is "menuMC".
Here is the code:
In frame 1:
Code:
[code]....
View 3 Replies
Mar 2, 2004
Basically what I am trying to accomplish is to make a rotating menu comprised of circles that are spinning at a slow constant speed, and when the mouse goes over a circle(button) the menu stops rotating.
View 2 Replies
Sep 10, 2010
In actionscript3,using the ScrollPane component and the TweenLite package, would it be possible to animate to a particular scroll position?
View 2 Replies
Aug 13, 2010
I have a group for which I want to enable horizontal scrolling. Vertically the group should be as wide as possible (100%).
[Code]...
Now if I start the application the MyComp-component is about 200px wide and starts to expand its width to infinity. This is like some transition or animation and I don't know how to stop it. Setting something like maxWidth would solve the issue, but I don't want to set explicit values.
View 1 Replies
Feb 8, 2011
The project I'm working on has a massive background image (800px wide by 2585px tall) that slowly scrolls upwards. Before, I was using the code [URL].. I modified the code to scroll upwards, but in addition to having a weird intermittent bug that occasionally displays a pixel-tall blank line after the image and before looping the next, it really doesn't seem to handle dynamic loading well (I've tried using several different preloader scripts and it breaks all of them), something that may not have been an issue with the initial implementation but is now that I'm using a monstrously huge image.
Thus, my question: a. Is there another bit of free, Flash-based infinite scroll code floating around that has support for lazy-loading background objects (Say, the existing background chopped in 6)?
[Code]...
View 3 Replies
Jan 4, 2007
I need to build a variable speed horizontal scrolling bar that when the image is click produces a result from a database.
[URL]
However they are using Javascript I believe and I need to run PHP anf flash together.
View 1 Replies
Jun 2, 2009
Does any one have a simple horizontal scroll bar? I need a long image to scroll from left to right (no up or down)
View 3 Replies
Aug 11, 2009
I currently have a document set up with a large movie clip (about 2000px wide) and have created 2 buttons - left and right. I would like for when you mouse over the left or right button, the movieclip would slide across the screen horizontally.
View 8 Replies
Nov 10, 2009
Im making a website with a horizontal scroll and when I reach a certain point on the movie clip that im scroll, no images appear.
View 2 Replies
Feb 2, 2010
I'm putting together an image library on a horizontal scroll. Each of the images is a movie clip and there is an expansion button to see the full images that are contained. How to make it so the scroll contents expands and contracts as the movie clips expand and contract.
View 1 Replies
Aug 26, 2010
I want to take a "film strip" movie clip and scroll it to the left or right on mouse over.Mouse over left, it scrolls to the start of the movie clip...mouse over right, it scrolls towards the end, stopping at the end.Simple enough right? I can't find a single source. I found this script on but it gives me an error. That and I don't think it stops at the end. I think it loops.
ActionScript Code:
leftButton.addEventListener(MouseEvent.MOUSE_OVER, moveClip);
rightButton.addEventListener(MouseEvent.MOUSE_OVER, moveClip);
[code]......
View 6 Replies