# Need help using \_level script for pages

**URL:** <https://forum.kirupa.com/t/need-help-using--level-script-for-pages/221604>\
**Category:** flash\
**Created:** [April 5, 2007, 3:52pm UTC](https://forum.kirupa.com/t/need-help-using--level-script-for-pages/221604 "2007-04-05T15:52:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designursite](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/designursite/32/2209_2.png) [@designursite](https://forum.kirupa.com/u/designursite)\
**Post date:** [April 5, 2007, 3:52pm UTC](https://forum.kirupa.com/t/need-help-using--level-script-for-pages/221604/1 "2007-04-05T15:52:15Z")

</div>

Hi,

I have attached a zip file which has a main.fla and a folder pages which contains 2 fla’s p1.fla and p2.fla

The main page loads the first page which is p1 and as the main page has 2 buttons i am using \_level script to know which page to load, actually i wanted to create 3 buttons. Since i have already created 2 buttons the first page automatically loads but when i click on the 2nd button it does’nt the p1 page goes but it comes back again.

In the main there is a movie clip which has an instance name of page\_mc and the code inside it is:

```auto

 
nextpage="pages/p1.swf";
loadMovieNum(nextpage,1);
b1.onRelease = function() {
 if (nextpage!="pages/p1.swf") {
  nextpage="pages/p1.swf";
  _root._level1.page_mc.gotoAndPlay("close");
 }
}
b2.onRelease = function() {
 if (nextpage!="pages/p2.swf") {
  nextpage="pages/p2.swf";
  _root._level1.page_mc.gotoAndPlay("close");
 }
}
 

```

Please if someone can help me with this, I would appericiate it.

Thanks,  
Regards,  
Ibrahim.
