Jump to content
Search Community

pflopez

Members
  • Posts

    5
  • Joined

  • Last visited

pflopez's Achievements

0

Reputation

  1. So, I've changed my code so the names of the sections loaded are different, but I still get the same behavior.. So I guess is something else?
  2. Sorry I didn't reply earlier. Yes it did work!
  3. Hi there, I have a question: I'm loading some swf with loaderMax and when I do a simulated download whenever I change the swf I'm loading in a holder, the content is loaded again, like it's not being catched or something.... I'm giving the content loaded in the main holder the same name; I don't know if that may be the problem. thanks in advance!
  4. Hi there, I'm trying to do a simple interface using loaderMax: an index.fla that loads external swf's ; basically a menu and a container on witch I load the content. I've used loaderMax to load the menu (on a sprite called menu) and "main.swf" on a sprite (called contenido) The menu has buttons that should change the content of the parent.container, but I can't seem to get the type casting or instance calling correclty here is the (some) code of the index class: public class index extends MovieClip { public var cargando_mc:loaderBase; public var miMenu:menu; // this is my menu class public var contenido:Sprite; public function index() { LoaderMax.defaultAuditSize = false; this.contenido = new Sprite(); addChild(contenido); this.miMenu = new menu(); addChild(miMenu); var queue:LoaderMax = new LoaderMax( { name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler , auditSize:false } ); queue.append( new SWFLoader("main.swf", { name:"main", container:this.contenido, x:0, autoPlay:false } ) ); queue.append( new SWFLoader("menu.swf", {name:"menu", container:this.miMenu, x:0, autoPlay:false}) ); queue.load(); } and the class "menu" public class menu extends Sprite { public var bot1_btn:SimpleButton; public var bot2_btn:SimpleButton; public function menu() { //bot2_btn = new SimpleButton(); if (bot1_btn == null) { bot1_btn = new SimpleButton(); } bot1_btn.addEventListener(MouseEvent.CLICK, onClick); } public function onClick(evt:Event) { trace(MovieClip(this.parent).contenedor); // this output an error: /* TypeError: Error #1034: Type Coercion failed: cannot convert com.greensock.loading.display::ContentDisplay@4bf1191 to flash.display.MovieClip. */ } } I've also tried setting the original container as a property on menu.as but didn't work either... Any ideas how to acomplish this? I'm migrating from AS2 , so I'm not sure if this is a basic AS3 question or a greensock one Thanks in advance!
×
×
  • Create New...