A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: laodMovie & buttons

  1. #1
    Senior Member creekmonkey's Avatar
    Join Date
    Jul 2006
    Posts
    121

    laodMovie & buttons

    Is it not possible to create a movie, then load it into another movie and have the buttons and functions still work?

    my_movie=this.createMovie();
    my_movie.loadMovie("url");

    Button and scripts will not work in child movie using this method.

    BUT! if I just use loadMovie("url");
    everything works fine, except I can not unload movie using this method.

  2. #2
    Senior Member
    Join Date
    May 2005
    Posts
    163
    What I think you need to do is lock your root so that the loaded movie's root references the root of the entire movie not the 1 you just created.

    So your code should be...

    Code:
    my_movie=this.createMovie();
    my_movie._lockroot = true;
    my_movie.loadMovie("url");
    Please note that the _lockroot must be set BEFORE your loadMovie.

  3. #3
    Senior Member creekmonkey's Avatar
    Join Date
    Jul 2006
    Posts
    121
    Doent work. Even if I create the child movie within the main movie when exported it doesnt work.

    Is there any way to "unload" a movie that is loaded with
    loadMovie("url") instead of using my_movie=this.createMovie('url")?
    Last edited by creekmonkey; 02-12-2007 at 09:29 PM.

  4. #4
    Game Master ConnELITE's Avatar
    Join Date
    Apr 2005
    Location
    United States, DC
    Posts
    474
    this is kind of a stupid work around but I loaded a movie with loadMovie("url") and the movie I loaded would load the orginal movie if you clicked another button. Just an idea, but in experiance I have not been able to get the whole createmovie loadmovie thing to work as it should. Maybe it will be fixed in V5?
    BC

  5. #5
    Senior Member
    Join Date
    May 2005
    Posts
    163
    If you don't mind, zip your .movie and any associated files and upload it to the forum so that I can get a better understanding of what your trying to do because the _lockroot should work but maybe your doing things in a different way than I'm thinking.

    Also there is an unloadMovie() method (my_movie.unloadMovie()).

  6. #6
    Senior Member creekmonkey's Avatar
    Join Date
    Jul 2006
    Posts
    121
    just a simple movie with a button with actions
    Attached Files Attached Files

  7. #7
    Senior Member
    Join Date
    Nov 2003
    Location
    Coimbra - Portugal
    Posts
    139

    my experience

    1 - Sorry my english.
    2 - I'm not a pro.
    3 - I had this problem before, no one in this forum got help me with this (in that time the support from 3dfa was zero), the unique help we had - Belanius. I got a work around.
    4 - Following link load images into a main movie, and buttons work: http://www.sagos.pt/TESTES/load_jpg_v0005/ .
    5 - Following link load images into movie inside a main movie, buttons work: http://www.sagos.pt/TESTES/anim_site/site_sagos_v7/ .
    6 - This is my experience, is this help you?
    7 - If yes i put my code here.
    Rui Paiva

  8. #8
    Senior Member creekmonkey's Avatar
    Join Date
    Jul 2006
    Posts
    121
    thanks rui_eduardo.
    It would be a help if I could see the code.

  9. #9
    Senior Member
    Join Date
    Nov 2003
    Location
    Coimbra - Portugal
    Posts
    139

    Yr reply

    Please go to the above links and click on Load CODE.

    Rui

    Sorry, the link is this: http://www.sagos.pt/TESTES/

  10. #10
    Senior Member
    Join Date
    May 2005
    Posts
    163
    I exported the child_movie again and everything seemed to work. Try re-exporting the child_movie again yourself. If you still have a problem then what I need to know is what version of 3DFA you are using?

  11. #11
    Senior Member creekmonkey's Avatar
    Join Date
    Jul 2006
    Posts
    121
    Problem solved " I THINK".
    I was exporting as flash 7. I changed to export movie as flash 8 and it worked.

  12. #12
    Senior Member creekmonkey's Avatar
    Join Date
    Jul 2006
    Posts
    121
    is there anyway to do this same thing or something similar for a child movie.
    When I have a child movie and export it im having the same problems.
    Sometimes but not always i get an error that says something like The javascript function 'element ("")' can only be used for elements with properties on line 2
    mlink("root[instruction@90][Movie 208@8]").gotoAndPlay("sc2")

    this error does not always show, but the scripts do not work.

  13. #13
    Senior Member
    Join Date
    May 2005
    Posts
    163
    Upload an example and maybe someone can come up with how to fix it.

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