A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Referencing a button in a child swf

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Posts
    12

    Referencing a button in a child swf

    edit- Was able to fix it, this code worked

    PHP Code:
    var imageReq:URLRequest = new URLRequest("travel-dump.swf");
    var 
    imageLoader:Loader = new Loader();
    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETEloadHandler);
    imageLoader.load(imageReq);

    function 
    loadHandler (event:Event){
    var 
    myClip:MovieClip event.target.content;
    addChild(myClip);

    myClip.= (stage.stageWidth 975)/2;
    myClip.= (stage.stageHeight 610)/2;




    myClip.btnClose.addEventListener(MouseEvent.CLICKbtnCloseTravel);

    function 
    btnCloseTravel(event:MouseEvent):void {
        
    trace("worked");
    }


    Last edited by KiKaL; 09-16-2009 at 04:11 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center