How to increse performance of raster scrolling on Mac ?

Posted by Max on Stack Overflow See other posts from Stack Overflow or by Max
Published on 2010-02-25T14:29:33Z Indexed on 2010/03/16 10:26 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

I have a game with a big raster map

Now we are using jpeg (4900x4200)

And durring the game we need to scroll through this map.

We use the following:

Class Map extends mx.containers.Canvas

and mx.controls.Image on it

In constructor we have:

public function Map() {
        super();
        image.source = ResourceManager.interactiveManager.map;//big image
        addChild(image);
......
}

for scrolling we are use:

    if(parentAsCanvas==null){
        parentAsCanvas = (parent as Canvas);
    }

    parentAsCanvas.verticalScrollPosition = newX;
    parentAsCanvas.horizontalScrollPosition = newY;

In windows, we have very good performance. In Linux and Mac in flashplayer we have a good performance too.

But in browsers performance is quite slow! What can we do to resolve it?

© Stack Overflow or respective owner

Related posts about flex

Related posts about mac