Please help me with this code

This code is placed in several text boxes in my 10th frame and when I go to the 15th frame and come back to the 10th frame the selected checkboxes are not visible.

Can anyone tell me how to keep my_Dyn_Txt1 visible unless it’s unchecked. But at the start I need my_Dyn_Txt1 not to be visible as in the code. After the checkbox is selected I should be able to move to any frame (front and back) while my_Dyn_Txt1 is still visible unless it’s unchecked by the user.

my_Dyn_Txt1._visible = false
cb1.onRelease=function()
{  if(this._currentframe==1)
 {   _root.my_Dyn_Txt1._visible = true
  this.nextFrame()
 }
 else
 {   _root.my_Dyn_Txt1._visible = false
  this.prevFrame()
 }
}