ActionScript 3.0 :: Background Scrolling Always Ends Up Choppy
Feb 17, 2010
I am building a game where I want to scroll the background horizontally as the player moves. The issue is that the scrolling always ends up choppy. The player can move at different speeds and I understand that at greater speeds the scrolling is going to look weird but even at slower speeds the scrolling "stalls" on some frames it seems. This occurs even at 60 fps (scrolling an image). I update the position each frame and I even tried using delta but still no dice. I don't have a concrete example but if you look at the scrolling in this example demo it behaves the same - the background scrolling is not smooth. [URL].
Im making a scrollable mc. Easiest thing in the world.... but the damn scoller just will not stop when the movie clip it's scrolling ends. It stops....eventully... but not close enough. What actionscript do I need to use and where do I put it?
I have an area where paragraphs of type slowly scroll up my screen. Every thing is working fine - however, if you look closely the type is scrolling pretty raggedly - as in choppy. It is subtle, but there. Just wondering the best way to scroll type - should I bitmap it into an image? Outline the type in illustrator? Or just bring it in? I have anti-aliased for animation checked - and have tried multiple options, but not seeing any huge differences.
I have some preloader (timeline-based) content and some FLV's that I want the user to see while other content is loading in the background. The preloaded content and the FLV's are very choppy while the content is loading and run fine afterward. I initially thought this might be a RAM issue, but my other apps are running fine at the same time (YouTube, etc.) so I think it's an issue within my code or Flash Player. How do the really nice preloaders (animation on timeline OR FLV's) run so smoothly while background content is loaded? For example, are they independent SWF's? internalized classes exported for Actionscript? some other option I'm not privy to? Mine, for example, are internal classes in the main library that I have exported for AS.
I have converted a large background image (much larger than the stage) into a Movie Clip. I did this so I can make it scroll as the player traverses to the edge of the scene.This appears to make the player free to roam the entire background image.I have a tree symbol with a class attached to it that blocks player movement.Here is my problem:
When I drag and drop instances of the tree symbol onto the background, the trees are stationary and do not scroll with the background.I do not want to have to implement code to make the trees scroll when the background does.I was wondering if there was a way to simply attach the trees to the background so that if the background moves, the trees move with it and appear to be part of the background as if they were drawn into it.It is convenient for me to be able to drag and drop as many trees as i need to block certain routes on the background from the player.I tried writing code to make the trees move but it was only working for the very last tree that I added to the scene.
I have come to a solution where I use an invisible button (covering the whole movie) where the action takes place in. Problem is, I can't put buttons on it because the invisible button blockes them.Does anyone know an other solution of making my background image scroll like the example site?
Im trying to animate a scrolling background which is simple enough. I dont want the background animation to scroll when the game is first loaded, I only want it to begin scrolling after the play button is clicked.
Ive used stop(); command in the first line of the MovieClip instance that is the back ground.
Some things I have tried
- Coding in flash to scroll the background, add a check to see once the background reached a certain x.position on the stage, it would addChild the same instance, where it originally was located and repeat the scroll process. I couldnt get this work, but would be intersted to see how you guys would approach it.
-Tried using a gotoAndPlay(2); in the movieclip last key frame to repeat the process. This causes the animation to chop up. I tried using this several diffrent ways, I could get it work at one point. But the background would scroll before the button was even clicked, I couldnt figure out a work around.
I've got a 800x600 document that has a panoramic picture scrolling horizontally and buttons in the image.
i've got this piece of code for AS2.0
[Code]...
Otherwise it is working all good, but I'd like it to stay put at the start. Right now it immidiately starts scrolling to right unless I move the mouse on top to stop it. So ye, i need to have it sitting still and only scroll when the mouse is at the edges of the document.
I'm trying to create a scrolling game in as3. The problem I'm having is how to make things like explosions and rockets firing from the ground at the player object to scroll with the background instead of staying stationery with the player object during the game. Does anyone know a simple method to keep the explosions and other stuff not connected with the player object, to stay scrolling with the background?
I am having problem in Zoom with scrolling of background. I want like " There will be a huge background and pan with mouse. when we click on any area that particular area will zoom in and I have to capture that image. And one more thing , that background will contain animated movieclip. Ref:- [URL] In above reference you will find bg is simple bitmap with no scrolling..
I would like to create a scrolling background for a web site (something that functions like the old 2d pane scroller games). Does anyone know of any books/articles that address this functionality?
I have a text field containg an amount of dynamic text. I scroll it auotmatically with AS but it appears that whenever I make the text scroll Flash automatically throws in a background (on the text) and I can't seem to turn it off. I have an image behind the text so I need the background transparent.
I'm trying to make a game where the character stays in the middle of the screen and the background scrolls as the arrow keys are pressed.
I've got it moving fine, but the background scrolls off the stage when you reach the edge. The background's bigger than the stage. I want to stop the background moving before this happens.
I have a scrolling background to mimic the effect that my "character" is walking around. It moves according to my up/down/left/right keys. The problem is I can go too far "up" and my background slowly reveals the white stage beneath it.Is there a way to set a parameter or restriction on this image that once the top side of it hits the top of my stage it can no longer continue moving down?
I have a scrolling background and am trying to place an object on top of it dynamically. I can get the object(which is a picture of a tractor to appear over the background with the following statement attachMovie("tractor_mc","pic",2); however it locates it at the wrong position on the stage. Is there anyway that I can control where the object is dynamically placed on the stage ? im using Flash 8 and ActionScript 3.0
I have created a scrolling background as per the instructions on website [url]...and I want to place objects on top of it. To get the effect that I want the instructions say to do the following:
"1. Put the Cloud ActionScript in a MovieClipCreate a new MovieClip, cut all the ActionScript from the main stage and paste it into the MovieClip. Go back to the main stage. Open the library and drag an instance of the Movieclip with the ActionScript on Stage. Now the dynamic clouds are inside a static Movieclip, which means you can now put things above it without using dynamic attachment. [code]...
How to place movieclips on a scrolling background with AS3? My background scrolls and my character runs when the right arrow key is pressed. But when I tried to place the obstacles he is supposed to jump over, only the first one is visible, and it looks like he's chasing it. My background (Bg) is 3802.8px wide and I put the obstacles and "home" (Cabin) about 600px apart.
var bg:Bg = new Bg(); addChild(bg); bg.y = 280.1; var man: Man = new Man(); addChild(man); [Code] .....
I have a question on creating scrolling text. I want the background transparent. Here's what I have: [URL]. The content is there, it just isn't visible. I copied the code and dragged the actual scrollbar/arrows from the tutorial.
The code is as follows: fscommand("allowscale", "false"); bar.useHandCursor = dragger.useHandCursor=false; space = 20; friction = 0.9; speed = 4; [Code] .....
I'm working on a website that is kind of set up a bit like a flash game. the background scrolls continuously with the movement of your mouse, and loops to make it appear seamless. my problem is with the quality.. it seems to skip or jump a little when it moves, and I am trying to get it as smooth as possible.
the source file is here: http:[url]....
you can just export it to see what I am talking about. what can I do to make it not so jumpy? are there settings I can adjust, or does anyone have any other code variations that would improve on mine?
I want to make a continuous scrolling image like the one I found here [url]....only thing is i want it to scroll right to left I tryed to change the code
I'm making a simple side scrolling platform game called Kit Run. For moving left and right, I have the sprite run in place while the background scrolls in the opposite direction. However, when the sprite jumps straight up and down, the background stays stationary. What I need help with is getting the background to scroll down when the sprite moves up beyond a certain point, and up when the sprite moves down beyond a certain point. Ive tried several probably unnecessarily complicated methods that only sort of work.
I've been looking around for a way to make a accelerating background that moves in the direction the mouse is pointing .. by accelerating i mean when your in the middle of the page it stands still but if u move out in any direction it goes faster and faster depending on how long ur from the middle, but still moves the same way you point .
I am trying to create a horizontal scrolling background image with mouseover. A post a while back seems to have all the details.
[URL]
Everything in the file that was attached at that post seems to work exactly, how I want it to, however I don't understand how to make it work with my own imagery. There are 3 movie symbols and I am not sure how to create the symbols so they work properly with my own images.
This shoud be relitively easy but for some reason I am having difficulties.