A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: buttons in load movie

  1. #1
    Member
    Join Date
    Mar 2003
    Location
    Manchester, England
    Posts
    89

    buttons in load movie

    right ive just spent all night getting some navigation right where i have buttons that scroll a movie clip to view different images, i then have used the load movie commmand on the main page of the site to load in this piece of navigation but the buttons are now not working i think it has something to do with the buttons not being the parent movie
    how can i solve this

    thanks

    p.s this description is a bit vague so if you need me to go into more detail just tell me
    also would the buttons work if i used different scenes instead of loading in a new movie
    Last edited by carl_00; 07-08-2003 at 10:50 AM.

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    It's the target path you used. What works in a movie when it's the only movie never works when it gets loaded to another. Everything changes. Now you have to include the name of the empty movie clip you loaded the movie into. Where before it might have been this:

    _root.movieClip.gotoAndPlay(2);

    It now has to look like this:

    _root.emptyMovieClip.movieClip.gotoAndPlay(2);

    Naturally, when you do a test movie in that swf, it won't work, because the target paths don't mean anything, but it will once it gets loaded.
    Last edited by iaskwhy; 07-08-2003 at 10:53 AM.

  3. #3
    Member
    Join Date
    Mar 2003
    Location
    Manchester, England
    Posts
    89
    right i think i get you, still pretty new to flash
    cheers

  4. #4
    Member
    Join Date
    Mar 2003
    Location
    Manchester, England
    Posts
    89
    nopedont have a clue what to do there
    am i suppose to change the script in the loadmovie command that is on the empty page or change the script on the buttons in the movie that is being loaded

  5. #5
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Change the script in the buttons in the movie to be loaded. Paste in the code you use to load the movie and also the code on the buttons, and I can give you back what you need.

  6. #6
    Member
    Join Date
    Mar 2003
    Location
    Manchester, England
    Posts
    89
    on (release) {
    loadMovie("drawings.swf", "_root.guide1");
    }
    this is the script i have used to load in the movie

    on (release) {
    xpos = -598;
    }
    and this is the script on one of the buttons

    thnaks for your help iaskwhy

  7. #7
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Try this:

    on (release) {
    _root.guide1.xpos = -598;
    }

    When you load an external swf into a movie clip, the external becomes the movie clip, so you target through that once it's loaded. As I said, it won't work when it's tested in the external, cause the path is wrong there, but it works once loaded to the main movie, where the path is correct.
    Last edited by iaskwhy; 07-08-2003 at 12:06 PM.

  8. #8
    Member
    Join Date
    Mar 2003
    Location
    Manchester, England
    Posts
    89
    right now i get you fingers crossed hope it works

  9. #9
    Member
    Join Date
    Mar 2003
    Location
    Manchester, England
    Posts
    89
    woohoo!
    done it i just had to put _root.xpos instead of just xpos thanks for your help iaskwhy

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