A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] External Linking - Serious Newbie

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Posts
    6

    [F8] External Linking - Serious Newbie

    Hi all,

    I am extremely new to Flash and find myself working on customizing a few pre-structured Flash games to try to become more familiar with the program. I am trying to use the "play again" button in the game to launch a different .swf file (same game, different theme/version). In a different chat room, the very nice "jAQUAN" posted this message:

    Quote Originally Posted by jAQUAN
    If you want to load a different .swf into the running flash movie, you use loadMovie() or the more advanced movieClipLoader object.

    All you need is a target movie clip on the stage with an instance name applied. It's contents will be replaced by the .swf you import.

    If your target clip was named myTarget_mc and you wanted to load different_file.swf the script would be.

    Code:
    on(release){
      myTarget_mc.loadMovie("different_file.swf");
    }
    I've copied the quote here so that maybe someone in this "newbie" chat might be willing to show me a bit more grace and help me understand what seems to be GREAT help.

    thanks in advance.

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    If the code helped, here is an explanation of how.

    This code must be placed on the button or MC as is. When the object is released (the mouse button released) then it will load the different_file.swf into the myTarget_mc movieclip.

    If you create a MC named myTarget_mc and place this code on it. When the user clicks it, then new sef file will be loaded.

    Hope that is clear as mud.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    Apr 2007
    Posts
    6

    Big Thanks

    samac,

    Your explaination is/was great. Now that I "know" what 'MC' etc means, it makes more sense. I'll try the code now with my elements actual names and we'll see if it works.

    Thanks again for your help.

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