my background has 6000px in height. afaik flash is limited to +/-2880px. what’s the preferred and performing way to deal with such large scrolling backgrounds in as3?
large scrolling background (6000px height)
|
|
|
|
|
Break it into tiles. |
|
|
yeah, that’s the obvious solution. but how to proceed then? simple image copying? and if so, how? or the gotoandstop solution with frames? |
|
|
Are you saying that the flash movie is 6000px, or the background pic is? |
|
|
the level is 6000px in height, ie the pic |
|
|
Break it into tiles, then line it up into one picture again in one big MovieClip. |
|
|
but if one break this into tiles, will it be necesary to manually hide all the tiles that are not currently on screen? as I have seen offscreen material is also giving performance hit at times, and with big background there should be some tiles that are offscreen at the same time… or will it be the same if they are not hidden? |
flipmytext
501 posts
|
it breaks tiles? |
|
|
well, yes, breaking the background into tiles theorically should do, but I dont seem to know how to perform this to avoid performance hit, hidding them when they are offstage wont make it more fluent…. any idea? |
Cervello
76 posts
|
Here’s an example: Say you have a background 6000px high and you want it to scroll upwards and loop. Your game is, say, 500px high. You break the background into 10 different 600px slices (size doesn’t matter so long as each slice is longer than the game, in this case >500px). One way to do this is to make a movieclip that has 10 frames, with each 600px slice on the same position in each frame.
|
Loading