[F8] No method with the name swapDepths ?! [as 2.0]
I am simulating an Excell spreadsheet. I have three SWFs: one to hold data, one to hold tabs, one to hold the column headings, and one to allow scrolling (because the header needs to scroll in concert with the data). My plan is to load each of these onto one SWF with a separate container for each (using the MoveClipLoader). I've gotten help on other posts to get this far, but I am stuck with errors that do not make sense to me.
Here are the error messages. I know that swapDepths and onLoadInit are real, so what is Flash trying to tell me?
Quote:
There is no method with the name 'swapDepths'
There is no property with the name 'onLoadInit'
These error messages come from the following code.
Code:
//This first container holds spreadsheet data
var MCdata:MovieClipLoader = new MovieClipLoader();
MCdata.onLoadInit = function(_loadedMC:MovieClip) {
//_loadedMC is now done loading and can be placed
//loadedMC is whatever clip you loaded the swf int (ie this.head)
if (_loadedMC == _root.dataFile){ //head loaded
_loadedMC._x = 0;
_loadedMC._y = 150;
}
};
MCdata.loadClip("Summary.swf",this.dataFile);
MCdata.swapDepths(this.getNextHighestDepth());//Pushes container to top
//This second container holds column headings and will sit above the 1st container.
var MChead:MovieClipLoader = new MovieClipLoader();
MChead.onLoadInit = function(_loadedMC:MovieClip) {
//_loadedMC is now done loading and can be placed
//loadedMC is whatever clip you loaded the swf into (ie this.head)
if (_loadedMC == _root.head){ //head loaded
_loadedMC._x = 0;
_loadedMC._y = 0;
}
};
MChead.loadClip("SummaryHead.swf",this.head);
head.swapDepths(this.getNextHighestDepth());pushes 2nd container above 1st
//This 3rd container holds tab button for loading new data and headings.
var MCtabs:MovieClipLoader = new MovieClipLoader();
MCtabs.onLoadInit = function(_loadedMC:MovieClip){
//_loadedMC is now done loading and can be placed
//loadedMC is whatever clip you loaded the swf into (ie this.head)
if (_loadedMC == _root.tabs){ //head loaded
_loadedMC._x = 0;
_loadedMC._y = 516;
}
};
MCtabs.loadClip("TabControl.swf",this.tabs);
tabs.swapDepths(this.getNextHighestDepth());
//This third container holds a scroll controll swf. It will sit at the very top.
var MCnav:MovieClipLoader = new MovieClipLoader();
MCnav.onLoadInit = function(_loadedMC:MovieClip){
//_loadedMC is now done loading and can be placed
//loadedMC is whatever clip you loaded the swf int (ie this.head)
if (_loadedMC == _root.nav){ //head loaded }
_loadedMC._x = 150;
_loadedMC._y = 20;
}
};
MCnav.loadClip("NavControl.swf",this.nav);
MCnav.swapDepths(this.getNextHighestDepth());