Jump to content
Search Community

MATSNL65

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by MATSNL65

  1. Will the rawContent method help me setting up buttons scripts for the SWFLoaded or ImageLoaded items?

     

    I'm trying to add EventListerers to loaded images and swfs that I loaded via the queue

     

    var content:ContentDisplay = loader.SWFcontent;

     

    name of the loader.SWFcontent.name of the movieclip.addEventListener(MouseEvent.CLICK, btnClickAbout);

     

    Does it go like this? Can a developer create an image/non SWF version of the SWFLoader in AS3? Can this be done via the Queue:

     

    var loader1:ImageLoader=new ImageLoader("img/button.png",{name:"myMenu_Mome",container:this,onComplete:completeHandler});
    loader1.load();
    
    function completeHandler(event:LoaderEvent):void {
       var myClip:MovieClip = MovieClip(loader1.rawContent);
       myClip.myBtn.addEventListener(MouseEvent.CLICK, clickHandler);
    }
    
    function clickHandler(event:MouseEvent):void {
       trace("clicked");
    }

×
×
  • Create New...