Oh. I didn't notice another thing in your code.
Parent window has its one CFlyTreeView reference.
So ideally the following code should work
window.parent.CFlyTreeView.getInstanceById('mytreee')....
But I think you are trying to achieve what is forbidden in a browser.
Are you able to call functions from parent window? For me, browser just does nothing on this.