A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [F8] filling in a shape with jpg

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    3

    [F8] filling in a shape with jpg

    How do i fill in a shape with a jpg?



    Ive used this as my shape and traced the bitmap (trace bitmap) now i want to fill in the spade with a jpg (i dont want to paint it as tiled) i want the spade to show a larage part of my jpg?

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    copy pixels of the jpg and paint it in the image at specific points and stuff...here is a link to the bitmap class in the AS 2.0 refrence.

    http://livedocs.adobe.com/flash/8/ma...rt4_ASLR2.html
    ~calmchess~

  3. #3
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    copyPixels of the bitmap class will help you on your way to achiveing your goal .....after i copied the largest portion of the source jpg onto the target then I'd start chopping up whatever is left of the source jpg up and copyPixels the parts of it onto the target.
    ~calmchess~

  4. #4
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    Use a mask. Be sure the mask is the exact shape without any boundaries.
    Once that's done you can use a jpg or whatever that is masked by that shape.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  5. #5
    Junior Member
    Join Date
    Apr 2008
    Posts
    3

    masking and rotating ?

    How would i do this? masking and rotating?

    I dont want to just use a jpg and rotate it, i would like to mask my image on the spade then rotate the spade without the image in the spade changing....

    Thanks

    Attached Files Attached Files

  6. #6
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    Rotate both the mask and the shape.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


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