# Class scope loop

**URL:** https://forum.kirupa.com/t/class-scope-loop/275257
**Category:** Uncategorized
**Created:** [November 11, 2008, 7:38pm UTC](https://forum.kirupa.com/t/class-scope-loop/275257 "2008-11-11T19:38:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)
#### Post date: [November 11, 2008, 7:38pm UTC](https://forum.kirupa.com/t/class-scope-loop/275257/1 "2008-11-11T19:38:45Z")

</div>

Hi

I have a base swf, which loops through xml, calling a page.as which pulls in seperate xml files and populates the pages.

I therefore need buttons to communicate back to thier respect page.as to do thier work…

atm I’m calling the pages via

```auto
 
var tempPage:Page = new Page(mc, i, 15, 155*i+100);

```

however unless I’m wrong I have to increment the tempPage variable so I can access the correct page.as

right? how do I do this?

thanks
