# myBitmapData.draw();

**URL:** https://forum.kirupa.com/t/mybitmapdata-draw/262655
**Category:** flash
**Created:** [June 8, 2008, 6:18pm UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655 "2008-06-08T18:18:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![unnamed](https://avatars.discourse-cdn.com/v4/letter/u/91b2a8/32.png) [@unnamed](https://forum.kirupa.com/u/unnamed)
#### Post date: [June 8, 2008, 6:18pm UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655/1 "2008-06-08T18:18:58Z")

</div>

Hi,  
could someone point me how can i move my bitmap, to for example x:100, y:100 ? i tried everything, and i cant do such an easy thing 😕 my head hurts from thinking and searching…  
my code:

```
ActionScript Code:
[LEFT][COLOR=#000000] **var** [/COLOR] Bmp:BitmapData = [COLOR=#000000] **new** [/COLOR] BitmapData[COLOR=#000000]([/COLOR][COLOR=#000080]390[/COLOR], [COLOR=#000080]540[/COLOR], [COLOR=#000000] **true** [/COLOR], 0xFF000000[COLOR=#000000])[/COLOR];

```

[COLOR=#000000] **var** [/COLOR] clip = [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]createEmptyMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“p”[/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR];  
clip.[COLOR=#0000FF]\_x[/COLOR]=[COLOR=#000080]92[/COLOR];  
clip.[COLOR=#0000FF]\_y[/COLOR]=[COLOR=#000080]80[/COLOR];  
clip.[COLOR=#000080]attachBitmap[/COLOR][COLOR=#000000]([/COLOR]Bmp, [COLOR=#000080]clip[/COLOR].[COLOR=#0000FF]getNextHighestDepth[/COLOR]COLOR=#000000[/COLOR], auto, [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR];  
Bmp.[COLOR=#000080]draw[/COLOR]COLOR=#000000[/COLOR];  
[/LEFT]

i have tried many things, like draw(mc, mymatrix) with translate properity, clip.\_x /\_y, but everything dont want to work, always some wierd clipping occurs…

please help and sorry for my poor english.

---

<div class="post-metadata">

### Author: ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)
#### Post date: [June 9, 2008, 3:43am UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655/2 "2008-06-09T03:43:43Z")

</div>

Ah yes I have this problem too.

It seems bitmapData only draws right and down from the registration point of the source movie clip, so if theres any graphics in the negative quadrants it doenst draw, but gets clipped…

Id also love to know how to get around this

---

<div class="post-metadata">

### Author: ![unnamed](https://avatars.discourse-cdn.com/v4/letter/u/91b2a8/32.png) [@unnamed](https://forum.kirupa.com/u/unnamed)
#### Post date: [June 9, 2008, 9:35am UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655/3 "2008-06-09T09:35:05Z")

</div>

i think its should be some combination of matrix tx & ty and position of clip mc, but i cant really figure it out.

---

<div class="post-metadata">

### Author: ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)
#### Post date: [June 9, 2008, 11:00am UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655/4 "2008-06-09T11:00:19Z")

</div>

ye me neither, i tried messing around with the matrix stuff but to no avail…

anyone got any advice?

---

<div class="post-metadata">

### Author: ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)
#### Post date: [June 12, 2008, 2:22am UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655/5 "2008-06-12T02:22:02Z")

</div>

bump 😉

---

<div class="post-metadata">

### Author: ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)
#### Post date: [June 12, 2008, 2:48am UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655/6 "2008-06-12T02:48:59Z")

</div>

bmd.scroll(x,y)

---

<div class="post-metadata">

### Author: ![unnamed](https://avatars.discourse-cdn.com/v4/letter/u/91b2a8/32.png) [@unnamed](https://forum.kirupa.com/u/unnamed)
#### Post date: [June 24, 2008, 12:53pm UTC](https://forum.kirupa.com/t/mybitmapdata-draw/262655/7 "2008-06-24T12:53:52Z")

</div>

its not working as it should i think, bitmapdata object is still created at x:0 y:0, only its content are moved by some x/y from scroll function…

```auto

var myMatrix:Matrix = new Matrix();
myMatrix.translate(100, 100);
var clip:MovieClip = this.createEmptyMovieClip("p", 1);
var Bmp:BitmapData = new BitmapData(200, 200, true, 0xFFFF00FF);
clip.attachBitmap(Bmp, clip.getNextHighestDepth(), auto, true);
Bmp.draw(mc, myMatrix);

```

i think its something with matrix but cant really get it to work ☹

please help
