On (realease) problems

Hello!

I have a button that is called to the stage using AS. When the user releases that button, a global variable is populated and the pageShell movie clip is removed and re-attached using the new variable info. When I run the movie, I get the following in the output panel:

Error Mouse events are permitted only for button instances
on (release:<name>){

I’m not sure why this is happening because the symbol being used (<idname>) is a button.

Here’s the code for one of the buttons:

 
function <functname> ():Void{
 this.attachMovie("<idname>", "<name>", this.getNextHighestDepth());
 <name>._y = 44;
 on (release:<name>){
  _level0.page = "<value>";
  this.pageShell.removeMovieClip();
  this.attachMovie("PageShell", "pageShell", this.getNextHighestDepth());
 }