A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: button in MC load swf in main timeline

Threaded View

  1. #1
    otto
    Join Date
    Jul 2009
    Posts
    13

    button in MC load swf in main timeline

    Dear all,

    I've a problem about AS2 on button within a MC.

    In my working flash, there are 2 MCs

    1. a MC called content, full size as the movie, act as a blank platform to load external swf
    2. another MC button containing a button, click to loadMovie, placed on top of MC content

    I'd like to click the button in button to load an external swf in content.

    The script I added on button in MC2
    Code:
    on(release){
    	loadMovie("XXX.swf", this.content);
    }
    This only work when the button is in the main timeline.

    I also tried
    Code:
    on(release){
    	_parent.loadMovie("XXX.swf", this.content);
    }
    Code:
    on(release){
    	_root.loadMovie("XXX.swf", this.content);
    }
    This will load the swf, but replacing everything. i.e., MC button disappeared with only the external swf playing.

    Would someone please help this issue?

    Many thanks,
    otto
    Last edited by ottoman0423; 07-30-2010 at 11:17 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