flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OmPrakash Muppirala <bigosma...@gmail.com>
Subject Re: Error #2006: The supplied index is out of bounds
Date Tue, 01 Mar 2016 08:10:47 GMT
You are right.  There is more to this.  Let me take a look at the math
again...

Thanks,
Om

On Mon, Feb 29, 2016 at 9:07 PM, Alex Harui <aharui@adobe.com> wrote:

>
>
> On 2/29/16, 6:37 PM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
> <omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:
>
> >
> >This piece of code is calculating the StageText object's global viewport
> >rectangle wrt stage co-ordinates.  Viewport is defined as: 'The area on
> >the
> >stage in which the StageText object is displayed. The default is the zero
> >rect.'
> >
> >This viewport is used to capture a bitmap of the stagetext and replace the
> >image the place of the stagetext object while scrolling.  So, any viewport
> >bounds that is outside the stage can be safely clipped to the bounds of
> >the
> >stage.
>
> I don't know this code at all, but isn't the goal to make sure no part of
> the viewport extends out past 8192 pixels?
> It seems to me that if the globalRect.x was -1000 and width was 500, this
> change would set globalRect.x = 0 and thus set the viewport to 500 visible
> pixels.
>
> IOW, by setting globalRect.x, you are moving the left edge of the viewport
> to either the right edge of the stage or the left edge of the stage.
> Moving it to the left edge of the viewport to the left edge of the stage
> results in visible pixels.  Did you intend to move the right edge of the
> viewport to the left edge of the stage when the StageText is off-screen to
> the left?
>
> Of course, I could be wrong again...
>
> -Alex
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message