# Component method cannot be accessed when that load as external movie by loadMovie()

**URL:** <https://forum.kirupa.com/t/component-method-cannot-be-accessed-when-that-load-as-external-movie-by-loadmovie/91575>\
**Category:** Uncategorized\
**Created:** [October 6, 2003, 8:10am UTC](https://forum.kirupa.com/t/component-method-cannot-be-accessed-when-that-load-as-external-movie-by-loadmovie/91575 "2003-10-06T08:10:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovemberRain](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@NovemberRain](https://forum.kirupa.com/u/NovemberRain)\
**Post date:** [October 6, 2003, 8:10am UTC](https://forum.kirupa.com/t/component-method-cannot-be-accessed-when-that-load-as-external-movie-by-loadmovie/91575/1 "2003-10-06T08:10:17Z")

</div>

Hi,

I’ve made a component to control the movieclip in the main timeline. The instance name of that movie clip passed as a parameter to the component. That is working fine in that file. But when that file loads into another SWF file, that containes a movieclip to hold the file that is being externally loaded, the methods are not working in that component.

This is the code of the component.  
//------------------------------------------------------------------------------  
#initclip  
function visiblerClass() {  
this.what = this.insofitem;  
}  
visiblerClass.prototype = new MovieClip();  
// \_root[this.\_parent.what].\_visible = false;  
visiblerClass.prototype.onLoad = function() {  
this.b1.onRelease = function() {  
\_root[this.\_parent.what].gotoAndPlay (“f1”);  
};  
this.b2.onRelease = function() {  
\_root[this.\_parent.what].gotoAndPlay (“f2”);  
};  
this.b3.onRelease = function() {  
\_root[this.\_parent.what].gotoAndPlay (“f3”);  
};  
};  
Object.registerClass(“Project\_Component”, visiblerClass);  
#endinitclip

//-----------------------

The gotoAndPlay (); method is not working when this movie is externally loaded using loadMovie ();

Pls find the attachment

Anybody to answer my question…  
With regards

abhilash
