A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS3 Bitmap draw problems

  1. #1
    Junior Member
    Join Date
    Mar 2004

    AS3 Bitmap draw problems

    Hi all,

    Ive got an image stored in bitmapData object, and i want to split this image into 100 diagonal strips (at 45 degress) The problem im having is speed because im working on a transition where they have to slide in at that angle.

    Solution 1:

    Currently ive created a -45 deg rotate matrix on the initial bitmap object and then copyPixels 100 rectangular sections into induvidual movieclips, these are then rotated 45 degrees to create the diagonal strips (an the initial rotation makes the image look the right way up)

    I'm using the Tweener classes for AS3, but tweening this is quite slow because of all the amount or movieclips onscreen.


    So i was wondering if i could draw directly to a new bitmap object, from my source bitmap object, Can i draw in diagonal regions? From what i can see copy pixels can only copy rectangles so i would have to copy this diagonal strip with the rest of the rectangle as transparent pixels?

    maybe im over complicating this working at bitmap level
    just wondering if anyone has played with diagonal masking?

  2. #2
    hippie hater Cimmerian's Avatar
    Join Date
    Oct 2006
    over there
    The rectangle lets you choose the area you want to copy, the point is the top left of the were the rectangle will be after is 'pasted'

Posting Permissions

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

Click Here to Expand Forum to Full Width

HTML5 Development Center