Q:

Increase Flash scene length

I am making a side scrolling flash game. The level is pre-made so there arent objects wich spawn on runtime. Now I made this level quite long, but in the editor window it suddenly stops. But in game it still scrolls on.
This is in the editor.You can see that the scroll bar cant go left any more.

And in game. 

The level is longer than then shown in editor. At first it was just putting an object at the border of the scene to increase it. But that wont work anymore. How can I increase the scene width? Thanks in advance! :)

A:

There is a limit to the size of the image you can display on the stage at any given time. It looks like you're probably pushing up against that limit, which is why you can't view any more.
There are various reasons for this, but it boils down to the fact that the flash DisplayList is relatively slow, as far as a Flash processes go. When you're dealing with a lot of stuff on the stage, Flash has to be aware of every single object, and you're going to get terrible performance if you have more on there than you need to.
But, don't despair! There are ways around this issue.
The first thing you need to know is that this limit is for bitmaps on the stage. You can have a bitmap in your project that's much, much bigger - as long as you're not trying to display the whole thing at once.
The way most gaming frameworks solve this problem is like this:
1) You store all of your image data behind-the-scenes, and you do all of your image manipulation etc there.
2) On every frame, you use copyPixels() to grab just the part of your larger image that would appear on the stage. That means if your stage view is only showing, for instance, 640x480px then you would just copy out a portion of your larger image equal to those dimensions. 
3) On the stage you just have a single bitmap into which you write the bitmap data from the copyPixels() in step two.
This is called "Blitting" and  if this sounds a bit complicated that's because it is. However, as I said many of the gaming frameworks will do the heavy lifting for you. Check out Flixel or PushButtonEngine, those are the two most popular frameworks.
It sounds like your current approach would require a bit of tweaking in order to make it work that way, but in the long run I'd recommend it - your game will become much more manageable, you'll get much better performance and you won't have to resort to some other kind of hackery in order to get your levels to load the whole way.
(The quick and easy solution would be to break your background into several images and just swap them out as you go, but again - that's putting a lot of work onto the rendering engine, which is generally not where you want to put your heavy lifting).
Good luck!

