flash - Resize/Scale multiple bitmaps(duplicate 1 bitmat over and over) -


i trying make frame arround uploaded picture repeating 1 image on , on again. user have enter real dimentions of picture , image scaled acordingly frame big should. problem when bigger pickture , scale images goes wrong , there smearing in movie clip. when move x:0 , y:0 well. when move center of screen smearing there. here's code use:

    public class frame_part extends movieclip {      public function frame_part(duplicationbitmap_org:bitmap, neede_pcs_num_height:number, order:string, rotation_num:int) {         super();         for(var i:int = 0; < neede_pcs_num_height; i++) {             var pc3:sprite = new sprite();             var duplicationbitmap_org1:bitmap = new bitmap(uplicationbitmap_org.bitmapdata);             pc3.addchild(duplicationbitmap_org1);             switch(order) {                 case("x"):                     pc3.x = * pc3.height;                     break;                 case("y"):                     pc3.y = * pc3.width;                     break;             }             pc3.rotation = rotation_num;         }     }  } 

here picture of happens. [link text][1]

[1]: http://share1t.com/avaxsz see left side. ok until way , smears :(. can please help?

p.s. after creation of scaled scalex , scaley accordingly.

maybe try flooring or rounding x , y? like:

pc3.x = math.floor(pc3.x); pc3.y = math.floor(pc3.y); 

alternatively use:

pc3.x |= 0;  

which removes after dot.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -