A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Loading a swf photo gallery into another swf?

  1. #1
    Junior Member
    Join Date
    Jun 2005
    Posts
    11

    Loading a swf photo gallery into another swf?

    HELP!

    I am having problems loading a Flash photo gallery (created with CoffeeCup Photo Gallery), into an existing .swf file.

    Currently, for other movieclips that call to an external .swf, I am using:
    loadMovie("bgimagegallery.swf", _root.image_mc);

    If you know anything about CoffeeCup Photo Gallery, then maybe you can help me. I downloaded the program and used it to create my entire photo gallery. The program exports a .swf version, plus automatically generates the .html, .xml and necessary javascript to run the .swf succesfully, when you use the html file to view the flash gallery.

    However, I cannot get this .swf to load into my main .swf movie.

    I am using Flash MX 2004.

    Any ideas?

    Mad props to the genius who may be able to help me.
    THANKS!

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    My first guess is that somewhere within the gallery swf they use _root in the coding... this would break because _root, once loaded, would refer to the root of the main movie rather than the gallery movie.. There is a method to work around this, but I don't think it's supported in mx 2004... check the help files for _lockroot. If you can use it you would code it like so:

    image_mc._lockroot = true;
    image_mc.loadMovie("bgimagegallery.swf");

    This is precisely why using _root is generally bad coding practice.. best to use _parent.

    good luck!
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Junior Member
    Join Date
    Apr 2003
    Location
    boston, MA
    Posts
    9
    you have to use

    LoadmovieNum("gallery.swf",1)

    it has to be loaded onto a level because there are paths in the gallery code that do not let it load into an mc for some reason.

    if you need to position it, open up the gallery .xml file and on the first few lines there is a x="0" and y="0". change those to where you want it to load in your movie.

  4. #4
    Junior Member
    Join Date
    Nov 2008
    Posts
    1
    I'm having trouble along these same lines, but I'm using the Coffee Cup Calender, not the photo gallery. I can get the calender to show up in my exported swf, but it doesn't have any text. Any ideas?

    You can check it out here:
    http://colinpanetta.com/CA/test/test.htm
    The smaller red square is a button. Press it to activate the calender. Here's the code I have applied to the button, as per mike's posts above:

    on (release) {
    mvTheMovie._lockroot = true;
    mvTheMovie.loadMovie("mycalendar.swf");
    }

    (When I use the "LoadmovieNum("mycalendar.swf",1)" format as suggested by oxotek above, my button breaks)

    Here's my files:
    http://colinpanetta.com/CA/test/

    I'm exporting as Actionscript 2- could that have something to do with it?

    I would also be interested in knowing how to resize the calender. I have it on the small setting, because resizing it from within the CoffeeCup program only seems to resize the sliding window, while the calender itself remains the same size.

    Huge thanks, big ups and kudos in advance to anyone who can 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