It loads the movie into a layer instead of a target. They've changed it to stop the ambiguity in the functions. I don't really use Flash much any more so it's hard to keep track of all of the changes.
Glad it's finally working!
Money!
Nice work. loadMovieNum?
It loads the movie into a layer instead of a target. They've changed it to stop the ambiguity in the functions. I don't really use Flash much any more so it's hard to keep track of all of the changes.
Glad it's finally working!
Hey man,
Got another one for you.
I'm trying use the MovieClipLoader class to load up a swf and have it start at a particular frame. Such as:
Here is what we got working last night:Code:var myloader:MovieClipLoader = new MovieClipLoader(); myloader.addListener(this); myloader.onLoadComplete = function(target:MovieClip) { target.gotoAndPlay ("Start") }; myButton_mc.onRelease=function(){ myloader.loadClip("myexternalmovie.swf", this._parent.holder_mc); }
The Bold underline text is where I would imagine most of the magic happens once again. How Would I place the MovieClipLoader into this and have that swf go play that particular frame label?Code:var menuArray:Array = [{mc:p1, name:"Hardin & Luckett (Marana)", label:"HardinLuckett" }, {mc:l1, name:"Tucson", label:"TucsonAZ" }]; for(var i:Number = 0; i<menuArray.length; i++){ var btn:MovieClip = menuArray[i].mc; btn.btnMC.btnText.text = menuArray[i].name; btn.queue = i; btn.onRelease = function(){ toggleButtons(this); loadMovieNum(menuArray[this.queue].label.concat('.swf'), 4); } } var selectedButton:MovieClip; function toggleButtons(btn:MovieClip):Void{ if (selectedButton) { selectedButton.gotoAndPlay("Out"); selectedButton.enabled = true; } btn.enabled = false; selectedButton = btn; }
Thanks in advance!
Brian
Try:
PHP Code:var menuArray:Array = [{mc:p1, name:"Hardin & Luckett (Marana)", label:"HardinLuckett" },
{mc:l1, name:"Tucson", label:"TucsonAZ" }];
for(var i:Number = 0; i<menuArray.length; i++){
var btn:MovieClip = menuArray[i].mc;
btn.btnMC.btnText.text = menuArray[i].name;
btn.queue = i;
btn.onRelease = function(){
toggleButtons(this);
var movieContainer = _root.createEmptyMovieClip("movieClip", 5); // You could use this.getNextHighestDepth() instead of astatic depth number
var movieLoader = new MovieClipLoader();
var listenerObject = new Object();
listenerObject.onLoadComplete = function () {
movieClip.gotoAndPlay(1);
};
movieLoader.addListener(listenerObject);
movieLoader.loadClip(menuArray[this.queue].label.concat('.swf'), movieContainer);
}
}
var selectedButton:MovieClip;
function toggleButtons(btn:MovieClip):Void{
if (selectedButton) {
selectedButton.gotoAndPlay("Out");
selectedButton.enabled = true;
}
btn.enabled = false;
selectedButton = btn;
}
Check the forum often for the latest design announcements. Everything from graphic design and web design, to films and music. Estetica is a great place for people to get together and help each other out.
Bookmarks