SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    using loadmovie: load swf in swf in another swf

    Greetings all, I'm having a problem with the loadMovie function. I have an .swf that loads 10 other .swf's in it. All together this is one page that shows 10 different models of seats and everything works. Now i want to load this, let's call it "seatpicker" to load when i click in the main site on a button called models. The code i used on the button is:

    _______

    on(release) {
    _root.load_mc.loadMovie("index.swf");
    }
    _______

    i made a movieclip with the instance name load_mc and the seatpicker is called index.

    When i run the main site and i click on the models button, it doesn't work... Has this something to do with my referral to _root or something? Perhaps its confused with the _root of the other .swfs? Anybody any idea of how to solve this problem? Thanks you all for your replys!

  2. #2
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have been trying some things out, and found out that (i think) due to some other actions that were linked to the button it didn't work...

    I made a new (totally clean of any actions) button and when i click on that, the index.swf file loads 100% but then the movie stucks at 0% of loading in the other swf's that should be loaded by the index file.

    But when i run the index file by itself (not loaded by the button), it easily loads all the 10 other swf's and everything works perfect... I have no idea what's wrong, i'll keep on trying, but if somebody has an idea, you would help me a lot and i would be very gratefull!

    I would like to post the links to show you what i mean, but apparently i'm not allowed yet

    Thanks in advance! Grtz

  3. #3
    reputation consultant ThaVincy's Avatar
    Join Date
    Mar 2003
    Location
    Flanders
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here you can find the links:

    the not working file that should load the index file
    http://fileserv.twizted.be/modellen/try.swf

    the working index file that loads in 10 other .swf's
    http://fileserv.twizted.be/modellen/index.swf
    ThaVincy | redesigning your image
    Twizted Imagebuilding personal and corporate reputation solutions

  4. #4
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks!

  5. #5
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might be on the right track with your _root issue. When loading in movies dynamically, the _root moves from the SWF to the parent MovieClip.

    If you're using _root in the SWFs you're trying to load in, that will likely be failing.

    You can either switch all your _root statments to appropriate this._parent or this._parent._parent as needed, or you can look into lockroot which will lock the root of SWFs to themselves. I've always preferred to use this._parent though as it seems like less of a hack.

    Good luck!

  6. #6
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply! Going to try it out right now!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •