The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 3 of 3

Thread: getColorBoundsRect() doesn't work in Player 9

  1. #1

    getColorBoundsRect() doesn't work in Player 9

    Is there any reason why getColorBoundsRect() of the BitmapData Class would work in Flash player 10 but not in 9?

    HTML Code:
    letterText.text ="H";
    var textBitmapData:BitmapData = new BitmapData(letterText.width, letterText.height, true, 0x00000000);
    var bounds:Rectangle = textBitmapData.getColorBoundsRect(0xFF000000, 0x00000000, false);
    trace(bounds); // (x=0, y=0, w=0, h=0)  in Flash Player 9
    trace(bounds); // (x=7, y=5, w=88, h=91) in Flash Player 10

  2. #2
    That would imply it was a bug fixed in FP10

  3. #3
    I came across this bug at one point. I'd wager a guess that in your example your text field's antialiasing is set to advanced. If you haven't specified the antialiasing, but have your fonts embedded, then it should be set to advanced.

    Your example actually works just fine if you set the text field's antiAliasType property to anything other than AntiAliasType.ADVANCED. So in the future, when you want to grab the bitmapdata from a text field, be sure to (at least temporarily) set its antiAliasType to AntiAliasType.NORMAL first.
    Vectorization Package - Convert raster to vector at runtime in the Flash Player!

    Collision Detection Kit - Shape-based collision detection package for AS3.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012