my external preloader is stoping my swf from working properly it loads up fine but when it comes to clicking on a person every one in the carousel dissapear?
heres my preloader code:
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target, loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}
mclL.onLoadInit = function () {
loader._visible = false;
loader.percent.text = "";
}
mcl.addListener(mclL);
mcl.loadClip("Carousel2.swf",holder);
and heres my mainmovie code
this.createEmptyMovieClip("theScene", 1);
theScene._x = 270;
theScene._y = 140;
objectsInScene = new Array();
//twodimensional array the number is the frame you want goto
var paneArray:Array = [["pane", 5], ["pane1", 10], ["pane2", 15], ["pane3", 20], ["pane4", 25], ["pane5", 30], ["pane9", 35], ["pane7", 40], ["pane8", 45], ["pane10", 50], ["pane11", 55], ["pane12", 60], ["pane13", 65], ["pane14", 70]];
spin = 0;
focalLength = 200;
displayPane = function () {
var angle = this.angle-spin;
var x = Math.cos(angle)*this.radius;
var z = Math.sin(angle)*this.radius;
var y = this.y;
var scaleRatio = focalLength/(focalLength+z);
this._x = x*scaleRatio;
this._y = y*scaleRatio;
this._xscale = this._yscale=50*scaleRatio;
//changed next line so all panes are on a removable depth
this.swapDepths(8000+Math.round(-z));
};
angleStep = 2*Math.PI/14;
for (var i = 0; i<14; i++) {
//get the first element of each array item
attachedObj = theScene.attachMovie(paneArray*[0], "pane"+i, i);
attachedObj.angle = angleStep*i;
attachedObj.radius = 100;
attachedObj.x = Math.cos(attachedObj.angle)*attachedObj.radius;
attachedObj.z = Math.sin(attachedObj.angle)*attachedObj.radius;
attachedObj.y = 100;
attachedObj.display = displayPane;
//give each pane its id
attachedObj.id = i;
//inside the panes give all the buttons an instancename one
attachedObj.one.onRelease = function() {
_root.gotoAndStop(paneArray[this._parent.id][1]);
//remove the panes
removePanes();
};
objectsInScene.push(attachedObj);
}
function removePanes() {
for (var i = 0; i<14; i++) {
theScene["pane"+i].removeMovieClip();
}
}
panCamera = function () {
spin += this._xmouse/3000;
for (var i = 0; i<objectsInScene.length; i++) {
objectsInScene*.display();
}
};
// make each figure run backAndForth every frame
theScene.onEnterFrame = panCamera;
anyone have any idea?
Thanks Martin