A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: BitmapData .. scales it down?

  1. #1
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,875

    BitmapData .. scales it down?

    hi guys,

    Havent really had the opportunity to use the BitmapData class till today.. im having a slight problem in the following code ... the movieclip mc is a small sqaure ... however when i use the Bitmap Data class to display it ..it seems to scale it down to about half the size of the original...

    the following code is in an empty fla, with a square movieclip "mc" on stage


    Code:
    import flash.display.BitmapData;
    var bmp:BitmapData = new BitmapData(mc._width, mc._height);
    bmp.draw(mc);
    
    var target:MovieClip = this.createEmptyMovieClip("mcContent", 1);
    target.attachBitmap(bmp, 1);
    ive attached the fla for u to see as well...

    im sure im missing something obvious ..but i cant seem to see what ..

    thanks in advance
    Last edited by silentweed; 06-04-2009 at 06:20 AM.
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    the draw command draws the mc without transformations,- but the mc._width & height properties already include those like scaled slightly in one or booth dimensions.

    Are you sure your MC isn´t scaled?

  3. #3
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,875
    hi thanks... no its not scaled at all .... that's the weird thing

    in fact open up an empty fla and put a square movieclip "mc" on stage and then test my code... u will see what i mean..

    cheers
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

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