# Tiled background in AS3, help to modify a function

**URL:** <https://forum.kirupa.com/t/tiled-background-in-as3-help-to-modify-a-function/248437>\
**Category:** Uncategorized\
**Created:** [January 8, 2008, 7:25am UTC](https://forum.kirupa.com/t/tiled-background-in-as3-help-to-modify-a-function/248437 "2008-01-08T07:25:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbucker](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@humbucker](https://forum.kirupa.com/u/humbucker)\
**Post date:** [January 8, 2008, 7:25am UTC](https://forum.kirupa.com/t/tiled-background-in-as3-help-to-modify-a-function/248437/1 "2008-01-08T07:25:17Z")

</div>

Hello you all.  
Ok i’m new here and really new to AS3, i was beginning to understand AS2 (lol) and now I have to compile this working AS2 function to AS3, can you help me and comment it so that I can understand. Many many thanks.  
(ps. can you maybe give me the url of a website where I can look for simple commented AS3 to learn again cause I’m lost with all these removed and new functions)

Thhis script is to tile a file loaded in the Library and called ‘pattern’ all over the stage.

```auto

 [FONT=&quot]import flash.display.BitmapData;[/FONT]
  [FONT=&quot]var tile:BitmapData = BitmapData.loadBitmap("pattern");[/FONT]
  [FONT=&quot]this.beginBitmapFill(tile);[/FONT]
  [FONT=&quot]this.lineTo(Stage.width, 0);[/FONT]
  [FONT=&quot]this.lineTo(Stage.width, Stage.height);[/FONT]
  [FONT=&quot]this.lineTo(0, Stage.height);[/FONT]
  [FONT=&quot]this.lineTo(0, 0);[/FONT]
  [FONT=&quot]this.endFill();[/FONT]
  

```
