A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: combining two flash files

Hybrid View

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    11

    combining two flash files

    I am making a Flash application which will contain a series of "pages" that are placed at diffferent points of the timeline and I'm using buttons to jump to these points. I also have a Flash game which I created separately in a different file. I am wondering how I can bring this game in to use it on one of my pages? I've tried but it doesn't seem to work. Don't know if this is to do with the Actionscript?

  2. #2
    Junior Member
    Join Date
    Apr 2008
    Posts
    19
    Make an empty clip, name it and put it on the scene where you want the game to show.

    Then, when you press the game button or what ever, do a gotoAndPlay to your game page (where the empty movie clip is). After gotoAndPlay(), put:

    "name of the empty movie you created".loadMovie("name of your game's swf.swf")

    So you have to export your game in a swf, and put it in the same folder than your main .fla .

    It should work

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Posts
    11
    yeah it does load in my other file. only thing is that it comes up for about ten seconds then disappears.

  4. #4
    Junior Member
    Join Date
    Apr 2008
    Posts
    11
    oh and the file i've brought in is a game so i dunno how to make it work as a game?

  5. #5
    Member
    Join Date
    Mar 2008
    Posts
    31
    hi, as for me, it's much easier to:

    1. create empty movie clip by ActionScript (createEmptyMovieClip method);
    2. make it with it's own variables and timeline ([movie name]._lockroot = true) - it's important (!);
    3. place it wherever U wish (_x and _y properties);
    4. load ur game in it (loadClip method or MovieClipLoader class);
    5. make it invisible if U with and appear when U need (_visible property).

  6. #6
    Junior Member
    Join Date
    Apr 2008
    Posts
    11
    well its loading in fine but it wont let me interact with the game?!

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