# Create pattern with external image

**URL:** https://forum.kirupa.com/t/create-pattern-with-external-image/183171
**Category:** flash
**Created:** [March 24, 2006, 11:07am UTC](https://forum.kirupa.com/t/create-pattern-with-external-image/183171 "2006-03-24T11:07:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flasholinos](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@flasholinos](https://forum.kirupa.com/u/flasholinos)
#### Post date: [March 24, 2006, 11:07am UTC](https://forum.kirupa.com/t/create-pattern-with-external-image/183171/1 "2006-03-24T11:07:52Z")

</div>

Hello! How i can fill a movie clip with an external image  
my code bellow works only when i import the image and use linkage  
with name ‘fonto’. I try also to create a movie clip but when i put it in place of fonto it doesn’t work.

import flash.display.BitmapData;

var jpg:BitmapData = BitmapData.loadBitmap(“fonto”);  
function createTiles():Void {

```
    with (_level0) {
        
   beginBitmapFill(jpg);
         moveTo(0, 0);
lineTo(0, 550);
lineTo(550, 550);
lineTo(550, 0);
lineTo(0, 0);
endFill();

    }

```

}  
createTiles();

---

<div class="post-metadata">

### Author: ![senocular](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/senocular/32/7217_2.png) [@senocular](https://forum.kirupa.com/u/senocular)
#### Post date: [March 24, 2006, 11:22am UTC](https://forum.kirupa.com/t/create-pattern-with-external-image/183171/2 "2006-03-24T11:22:01Z")

</div>

This might help:  
[http://www.senocular.com/flash/source.php?id=0.184](http://www.senocular.com/flash/source.php?id=0.184)

---

<div class="post-metadata">

### Author: ![flasholinos](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@flasholinos](https://forum.kirupa.com/u/flasholinos)
#### Post date: [March 24, 2006, 11:35am UTC](https://forum.kirupa.com/t/create-pattern-with-external-image/183171/3 "2006-03-24T11:35:02Z")

</div>

THANK YOU!!!
