Jump to content
Search Community

acto

Members
  • Posts

    18
  • Joined

  • Last visited

acto's Achievements

0

Reputation

  1. Thank you Carl! You saved my day I'm really grateful and really appreciate your kind help, All the best, acto
  2. Thank you, But how do I call my backToRoot(); function (which is in my loaded swf) from my button in my main SWF if I don't nest it in another function? (I feel stupid...) acto
  3. Hi, I know this is a documented issue, I read the tips section but I still can't figure out how to do this, maybe it's because I'm tired, maybe it's because I'm still a noob... Sorry for this question but could you please help me figure this out? I have a main movie into which I load swfs, what I want to do is: from my main movie (by clicking a button) I want to call a function that is in one of the loaded swfs... I tried the rawContent method but I'm getting errors, could you please help me figure this out? Thank you and sorry again for asking noob questions, acto This is my code: var queue:LoaderMax = new LoaderMax({name:"mainQueue"}); //MAIN SECTIONS queue.append( new SWFLoader("com/sections/credits.swf", {name:"credits", container:container1, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/sections/home.swf", {name:"homz", container:container2, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/sections/section_01.swf", {name:"oswiecenie", container:container3, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/sections/section_02.swf", {name:"XIX", container:container4, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/sections/section_03.swf", {name:"20Lecie", container:container5, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/sections/section_04.swf", {name:"zaglada", container:container6, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/sections/section_05.swf", {name:"PRL", container:container7, onProgress:progressHandler, onComplete:completeHandler}) ); //PLUS MENU queue.append( new SWFLoader("com/pMenu/bibliografia.swf", {name:"bibli", container:container8, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/pMenu/slownik.swf", {name:"slownik", container:container9, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/pMenu/pdfy.swf", {name:"PDF", container:container10, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("com/maps/warsaw.swf", {name:"warsaw", container:container11, onProgress:progressHandler, onComplete:completeHandler}) ); function progressHandler(event:LoaderEvent):void { Object(root).progressBar.visible = true; Object(root).progressTxt.visible = true; var percent:int = event.target.progress*100 // trace("progress: " + event.target.progress); progressBar.setProgress(event.target.progress, 1) progressTxt.text = String("Trwa ładowanie: " + percent + " %"); } function completeHandler(event:LoaderEvent):void { var image:ContentDisplay = event.target.content; Object(root).progressBar.visible = false; Object(root).progressTxt.visible = false; // trace(event.target + " is complete!"); } //FUNCTIONS TO --->> LOADED SWFS function goBackToRoot(): void { // this function is called when I press my button in my main SWF function onLoadSWF(event:LoaderEvent):void { var loadedMc:MovieClip = container3.rawContent; loadedMc.backToRoot(); // backToRoot(); is the function inside my loaded swf that I want to call from my main swf } }
  4. Ok, I think I found the solution txt.embedFonts = true txt.antiAliasType = AntiAliasType.ADVANCED Does this make sense? acto
  5. Hi, I have this problem with font display, I have a main movie into which I load sub movies (I use MaxLoader), when I test the sub movies individually everything if fine BUT when I load them into my main movie, my fonts do not display well, it looks like there is no antialiasing, the characters are all jagged... My main movie uses the same fonts as my sub movies, I don Thank you, acto
  6. Thank you, What you wrote is true, but this is why I have the xxxLoaded vars, the loadings occur only if they are != 1 and I set them to ==1 with the completeHandler, when I test the movie, everything works, I am just concerned with the use of if instead of else if, is this an acceptable method or do I risk getting errors? All the best, acto
  7. Yes, s010s01Loaded is my var that is set after the loading is complete and it doesn't change, s01Instance is the var tracking which instance is being clicked and this doesn't change until the user finishes exploring the whole section or gets back to root. This works fine the way it is with the if statements instead of else if, is it wrong to use the if statements like this? If it is, I will try to fix this, but I hope that it's OK Thank you for your help! acto
  8. Strange thing, when I use if instead of else if it works... function loadSubSections(): void { if (s01Instance == s01S01 && s01S01Loaded != 1) { LoaderMax.getLoader("salon").load(); } if (tableOn == 1 && tableLoaded != 1) { LoaderMax.getLoader("kwestia").load(); } } But I don't understand why else if doesn't work.... :/ acto
  9. Also, if I switch the loaders like so: function loadSubSections(): void { if (s01Instance == s01S01 && s01S01Loaded != 1) { LoaderMax.getLoader("kwestia").load(); } else if(tableOn == 1 && tableLoaded != 1) { LoaderMax.getLoader("salon").load(); } The kwestia.swf loads fine but the second swf doesn't, so there is no problem with my swf, or container, it must be something in the code... Please help, acto
  10. Hi Carl, Thank you for your help, I really appreciate it, I rewrote my code and it looks like this: var queue:LoaderMax = new LoaderMax({name:"mainQueue"}); queue.append( new SWFLoader("s01_01.swf", {name:"salon", container:Object(root).s01s01_container, onProgress:progressHandler, onComplete:completeHandler}) ); queue.append( new SWFLoader("kwestia.swf", {name:"kwestia", container:Object(root).menu_slide.kwestia_holder, onProgress:progressHandler, onComplete:completeHandler}) ); function loadSubSections(): void { if (s01Instance == s01S01 && s01S01Loaded != 1) { LoaderMax.getLoader("salon").load(); } else if(tableOn == 1 && tableLoaded != 1) { LoaderMax.getLoader("kwestia").load(); } } function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { var image:ContentDisplay = event.target.content; trace(event.target + " is complete!"); } The only problem is that my second swf still doesn't load... do you see anything wrong with my code? Am I missing something. All the best, acto
  11. Hi, I'm building a presentation with loaderMax and I would like to know if I can load multiple swfs using the same function, here is the code I have but it doesn't work, it only loads the first swf but not the rest: function loadSubSections(): void { var loader:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); if (s01Instance == s01S01 && s01S01Loaded != 1) { loader.append( new SWFLoader("s01_01.swf", {name:"s01", estimatedBytes:3000, container:Object(root).s01s01_container, autoPlay:true}) ); } else if(tableOn == 1 && tableLoaded != 1) { loader.append( new SWFLoader("s01_02.swf", {name:"s02", estimatedBytes:3000, container:Object(root).menu_slide.kwestia_container, autoPlay:true}) ); } loader.load(); function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { trace(event.target + " is complete!"); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } } I would like to have one function loadSubSections(); and use it with if and else if arguments to load different swfs, in different containers is this possible? Thank you, acto
  12. OK!!! Now it works, This is the code: function test(e:MouseEvent){ trace("fired from btn"); trace(parent.parent.parent as MovieClip); var parentMovie:MovieClip = parent.parent.parent as MovieClip; parentMovie.onParentFiredFromLoaded(); } Thank you for your help and putting me on the right track acto
  13. Ok, sorry for the last post, it still doesn't work I'm not getting the error but can't call the onParentFiredFromLoaded function... I will try something and get back with the results, hopefully they will be positive, Thx, acto
×
×
  • Create New...