Ok, i have solved the problem with 2880px bitmap limit.

Its easy done with scroolRect.x and scrollRect.y where you determine 
the starting point of a 'cut' and scroolRect.width and 
scrollRect.height to determine the width and height of bitmap you 
want to show, so W and H would be your screen W&H...

Something like this :

public var test:Rectangle = new Rectangle();

        private function cropMap():void{
                
                map_container.validateNow();
                
                test.x = - map_container.x/zoomFactor;
                mapa.x = - map_container.x/zoomFactor;
                
                test.y = - map_container.y/zoomFactor;
                mapa.y = - map_container.y/zoomFactor;
                
                
                //how much to crop
                test.width = main_container.width/zoomFactor;
                test.height = main_container.height/zoomFactor;
                
                //apply rect to SWF map
                mapa.scrollRect = test;
                
        }



Still no luck with X,Y limit, tho i found this :

"Ahh... if my old OpenSWF memories serve, is that because x/y values 
are
stored as 16-bit int (64k values), split into +/- (-32k -> +32k), 
given
quarter-pixel accuracy (-8k -> +8k)...

Troy."

Anyone? How would one go with virtualizing X&Y? 


--- In [email protected], "Troy Gilbert" <[EMAIL PROTECTED]> 
wrote:
>
> Yeah, you're hitting the 2880 pixel limit with bitmaps. No bitmap, 
including
> cached bitmaps, can be bigger than 2880 px in either dimension. In 
the case
> of cacheAsBitmap, it stops caching when that's the case.
> 
> Fortunately, you can control it a bit... I'd imagine that even when 
zooming
> in you're only showing less than 2880 pixels actually on screen. 
So, you can
> do a bit of caching. And you can control the size of the cached 
bitmap by
> setting the scrollRect for the displayObject.
> 
> Now, I'm not sure if the scrollRect is "smart" in that when you 
move it it
> simply redraws (stupid) or does a partial copy and a partial render
> (smart)... if its smart, then you've got it pretty easy, just move 
the
> scrolllRect around your map instead of moving the map (or its 
SWFLoader)
> around inside a container.
> 
> Another option would be to simply make the scrollRect be as big as 
possible
> while still being smaller than 2880px. This would allow you to drag 
the map
> around locally without it having to redraw but forcing a redraw if 
you
> dragged too far. Kinda similar result to a tiled renderer, not 
quite as
> efficient, but a whole lot less code!
> 
> Troy.
> 
> 
> On 5/2/07, helix206 <[EMAIL PROTECTED]> wrote:
> >
> >   Hello all,
> >
> > I have this strange ans stupid problem and the deathline is 
comming
> > in a fiew days, so i hope someone will be able to help me.
> >
> > First of, I am trying to drag a vector map inside another 
container
> > fluidly.
> >
> > So, I have a vector map, exported to .SWF. This map is loaded with
> > SWFLoader in another container, and the SWFLoader has a property
> > CacheAsBitmap set to True. Everything works just fine, and the map
> > drags very well inside the container. Problems araise when i zoom 
the
> > map (actualy scale it) beyond 2000px. Then draging becomes very 
slow,
> > and i sopose that CacheAsbitmap property just stops working.
> >
> > So, does anyone has any idea why is this heppening, and how could 
i
> > solve it?
> >
> > I will accept any sollution except tiling my map into 100 tiles 
and
> > showing only the ones that are on the screen. If no sollution 
will be
> > provided then i guess ill have to do it that way.
> >
> > Any help appriciated.
> >
> >  
> >
>


Reply via email to