jcg wrote:I am having trouble importing the swf I create with Pano2qtvr and then having it appear behind a mask (scripted). Does anyone have any hints as to how to accomplish this?
Thanks for any help.
import the pano into a container on your root:
this flag is set to avoid double loading of the pano
var panoLoadFlag:Boolean;
//pano loading function
function loadPanoContainer(){
this.panoLoadFlag = true;
//now you can use any newly created movie clip either manually on the stage or dynamically on the run:
//this.createEmptyMovieClip("pano_mc",10);
var loadListener:Object = new Object();
loadListener.onLoadProgress = function (target_mc:MovieClip, numBytesLoaded:Number, numBytesTotal:Number):Void{
this.my_pb.setProgress /*for this to happen drag a progressbar from the components library to your stage and place it and name it
*/
(numBytesLoaded,numBytesTotal);//progress bar in manual mode
this.my_pb._alpha = 100-my_pb.percentComplete;
};
loadListener.onLoadInit = function(target_mc:MovieClip){
target_mc._x = 0;
target_mc._y = 85;
};
loadListener.onLoadComplete = function(target_mc:MovieClip){
this.my_pb._visible = false;
this.navigation_mc.panoOn = false;
target_mc.stop();
target_mc._visible = false;
};
var loader_mcl:MovieClipLoader = new MovieClipLoader();
loader_mcl.addListener(loadListener);
loader_mcl.loadClip("swf/panoContainer.swf",this.pano_mc);
}
// here we finally load the pano, but only if it was not loaded before
if (this.panoLoadFlag == false || this.panoLoadFlag == undefined){
this.loadPanoContainer();
}
//end of Pano loading function
so you have your pano now use pano_mc.setMask(myMask_mc) and your are done.
Most things happen if you do not load the pano onto a manually created mc on your stage. Due to the depths management of flash. If you just use insert new symbol movieclip and drag this one from your library to your stage and name it pano_mc your not in trouble with depths and can mask your pano as you wish.