# Adding multiple QR codes for print

**URL:** https://forum.kirupa.com/t/adding-multiple-qr-codes-for-print/635534
**Category:** flash
**Created:** [November 3, 2016, 3:09pm UTC](https://forum.kirupa.com/t/adding-multiple-qr-codes-for-print/635534 "2016-11-03T15:09:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![McLucky](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@McLucky](https://forum.kirupa.com/u/McLucky)
#### Post date: [November 3, 2016, 3:09pm UTC](https://forum.kirupa.com/t/adding-multiple-qr-codes-for-print/635534/1 "2016-11-03T15:09:43Z")

</div>

Hi all,

Here’s what I’m trying to do:

[![](https://s17.postimg.org/4mf6lhhsb/goal_01.jpg)](https://postimg.org/image/4mf6lhhsb/)

I would like to add multiple QR codes to a movieclip for printing.  
The number in the QR increments by 1

I am using this class:

> **[jbpin/as3-qrcode-encoder](https://github.com/jbpin/as3-qrcode-encoder)**
>
> as3-qrcode-encoder - A QR code encoder in as3

The QR encoding works but my problem is in adding children and positioning them.

The important part of the code is this:

[code]

```
            var arrQR:Array = new Array(); 

            for(var qr:int = 1; qr <= intQRcount ; qr++){
                
                var QR:QRCode = new QRCode();
                QR.encode(intQRstartAt);
                intQRstartAt++;
                var bmpQRcode:Bitmap = new Bitmap(QR.bitmapData);
                mcPage.addChild(bmpQRcode);
                
                arrQR[qr] = bmpQRcode;
                //arrQR.push(bmpQRcode);
                
                //set size
                arrQR[qr].width = 50;
                arrQR[qr].height = 50;
                
                // set x 
                arrQR[qr].x = qr * intXmultiplier * intXSpacing;
                
               // set y

                }
                
                
            } //end for[/code]

```

The problem is that I end up with only one QR code, so something must be wrong when adding them as children.  
I would like to add generate each code and set the position after that.

How can I add multiple codes and set the position of properties individually ?

Thanks in advance !
