A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: controlling another swf

  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    10

    controlling another swf

    Hi all, I have two swf files
    and i need when i press a button in the first one then the second one loads another swf.
    anyone knows how?

    Thanks in advance.

  2. #2
    Junior Member
    Join Date
    Mar 2005
    Location
    Ireland
    Posts
    3
    Have you tried the loadMovie script? You need to save the second swf at the same level as the first one and call it into an empty movieclip which you have placed on the stage.
    The actionscript would be something like

    btn1.onRelease=function(){
    loadMovie("kevvers.swf",mc1);
    };

    If you are using Flash MX 2004 you can use the loader component and just put it in your timeline.

    I hope this is some help.

  3. #3
    Junior Member
    Join Date
    Aug 2002
    Posts
    10
    Thanks a lot but i think u didn't understand what i mean.
    they 2 separated files.
    let's say 1.swf and 2.swf
    so i want when i press on a button inside 1.swf then 2.swf load another swf.
    i hope u got me.

    thanks.

  4. #4
    Junior Member
    Join Date
    Mar 2005
    Location
    Mexico
    Posts
    29
    Try this
    considering that 1.swf is in the level 0 and we want to open 2.swf in level 1
    //code for the button you press on
    on (press) {
    loadMovieNum("2.swf", 1);
    }
    the guy who invents english langage

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