Hi, i learned how to do a basic site using Loader component from within flash to load external .swf. [works fine] was my first homework:)
now decided to create a simple “loader” that i could use as a gallery of my flash projects, thinking i could simply have a loader and fetch every swf i made and scale it to a box so viewers could click next and browse through all the swf i made…
That’s when the problem started…
so i have the basic code that works fine but as soon as i put .swf file with either a preloader(within the swf that i fetch with my loader) or a component…3 problems occur
1-(doesn’t worry me too much)the buttons within the fetched .swf files stop working…(i m sure there’s a work around i’ll check that later)
2-“Scale” set as “true” wont work properly or at all
**3-**the buttons i use to choose the swf to fetch only work once?!?!
My train of though…
(2) I would assume that either the files cannot scale properly as the “scale=true” looks at the preloader within the swf or the file isn’t loaded when the “scale=true” kicks in???
**(3)**as i see the preloader from within the swf flash the secound time i click on the button(the one that fetch the ext. swf) i would guess that the 2 preloaders are conflicting…no clue why.
Now if you read all that i must thank you for not giving up on me i really have issues in terms of explaining myself!!!
i did try all kind of combination (IE removing the “myLoader” preloader, changing the path to the swf from myloader.contentPath = “swf1.swf”; to mcLoader.loadClip(“swf1.swf”,myloader); nothing works.
Am i just crazy or is it just imposible to export to loader component files with other component or existing preloader…anything?? i m all ears??
thanks again for reading all this i just ratter give all the info that i can.
//-----------Initialization---------\\
extLoader_mc._visible = false;
//-----------------------------------\\
//--------Movie Clip Loader----------\\
var mcLoader:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
mcLoader.addListener(myListener);
myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {
extLoader_mc._visible = true;
var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
extLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
if (bytesLoaded >= bytesTotal) {
extLoader_mc._visible = false;
}
}
//myloader.contentPath = "swf1.swf";
mcLoader.loadClip("swf1.swf",myloader);
//-----------------------------------\\
//---------------Buttons btn1_mc---------------\\
btn1_mc.onRollOver = function () {
btn1_mc.gotoAndPlay("_over")
}
btn1_mc.onRollOut = function () {
btn1_mc.gotoAndPlay("_out")
}
btn1_mc.onRelease = function () {
// myloader.contentPath = "swf1.swf";
mcLoader.loadClip("swf1.swf",myloader);
}
//-----------------------------------------\\
(“myloader” is in fact called like that, i m not a fan of capitals.)