A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: load movie command problems

  1. #1

    load movie command problems

    Here is a strange problem I just noticed with my site.

    www.nurvnetsys.com/test/wone.swf

    all the submenu items you click on basically call an external movie into the right side of the screen.

    The buttons code is pretty simple, here is an example of the pants button:
    on (release) {
    loadMovie("pantorange.swf", "orangepant");
    }
    on (release) {
    unloadMovie("bluepant"); these are blank movies in the main TL.
    unloadMovie("redpant"); these are blank movies in the main TL.
    unloadMovie("tactical"); these are blank movies in the main TL.
    }

    The strange thing is as you can probably tell is that when u click on certain items, it just takes you back to the army of wone sign. But if you hit refresh, the links start to work. i am baffled by this. Any suggestions?
    I did make sure that all the pertinent files are in the same folder.

    undrdg

  2. #2
    up does anyone have any idea ?

  3. #3
    any idea why this is happening....all external swf are loaded in the same folder as the main movie.

    Again the behavior is that when the main movie is loaded i click on the content buttons that load and external swf in the main movie and nothing happens...it replace the into clip. However if i refresh the browser enough times i can get those items to show up.


    any help is great
    Thanks
    undrdg

  4. #4
    Member
    Join Date
    Sep 2003
    Location
    Wisconsin
    Posts
    47
    Are you saying that when I click on the link, it loads the external swf and then when I click on a t-shirt within the movie it returns back to the army of one? That is what happens to me. The external swf's load fine for me initially, but I get the wrong content when I click on a shirt or a hat. It seems to me that you simply have the wrong actions on the buttons inside the external swf. Where are we supposed to go when a t-shirt is clicked on?
    I blow spots like Waco, Texas....huh?

  5. #5
    the tshirt buttons are the ones that call the exteranl movies...or the pants the shirts the hats...etc....they all call external moveis...menus and sub menus are part of the main timeline...the funny thing is that the menu buttons above "returns, shipping...etc also call out external movies into the bottom...and thos always work...its only the ones like the tshirts buttons that sometimes don't work.

    Now if you hit refresh a couple of times...they work.


    undrdg

  6. #6
    Member
    Join Date
    Sep 2003
    Location
    Wisconsin
    Posts
    47
    Attatch the file if you can, maybe I can help. At the very least someone else will probably look at it.
    I blow spots like Waco, Texas....huh?

  7. #7
    www.nurvnetsys.com/test/wone.fla

    let me knwo if you can get to it.

    right click and save as
    Last edited by undrdg; 01-23-2004 at 05:12 PM.

  8. #8
    i have searched and searched and can't find anything on it.
    the only thing i can think of is do you think i should but the full url of the external movie? will that make a difference?
    I was under the impression that if it was in the same folder it was automatic

  9. #9
    Member
    Join Date
    Sep 2003
    Location
    Wisconsin
    Posts
    47
    Why dont' you try this for all of your external swf. It may be easier just set them all to target a movie clip named movie holder. This way all of the swfs get drop into movieHolder on you main timeline. You are only using one scene anyway and it would be much easier.

    loadMovie("yourMovie.swf", "movieHolder");

    Just like this
    http://www.sit.wisc.edu/~jhherrera/viscult14.html




    Hope that helps
    I blow spots like Waco, Texas....huh?

  10. #10
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You're using way too many holder clips for nothing really.

    You have curious code lines such as gotoAndPlay(1)'s, when the clip is already stopped on frame 1, and you should in fact be using gotoAndPlay(2)'s.

    And after playing around for a while with your .fla, I now suspect your preloaders on your external movies of being part of the problem.

    I've been working mainly with your pants sections... Anyway you could attach one (or better all!) your pants .flas?
    Thus pantorange, pantblue, pantred and tactical.

  11. #11
    everything u need is here


    thanks

    Thanks for all your help...good point about the preloader being the culprit..i was suspecting that myself.

    what can i do?


    Undrdg
    Last edited by undrdg; 01-25-2004 at 02:27 AM.

  12. #12
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Just tried it with one of my copied pantorange.swf, and it worked fine, so I guess my theory was right!

    Let me have a look at the preloader, now that you posted these .flas.

  13. #13
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yep! That's your main problem! Your references to _root in the preloader, work fine if testing the movie itself, but when loaded in a container clip of another main movie, then _root refers to the root timeline of the host movie and not the root timeline of the loaded movie itself. All those references should in your case, be changed to _parent, it should then work properly.

    Easier than that would be to have a generic preloader in the main movie, which eliminates the need to have one in each external movie.

    That said, as I posted above, that's your main problem, but you would have many other corrections to make.

  14. #14
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You can edit out the url to your files if you want, I've noted it down. Otherwise everybody has access to them!

  15. #15
    thanks for your help old newbie....you are da man.

    So getting back to the preloader, i should change the for each external movie or the preloader to the main fla?

    Can you give me an example of what you changed in the pant orange one?

    Thanks a million
    undrdg

  16. #16
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    This should be how all your preloaders should look...

    Code:
    onClipEvent (enterFrame) {
    	var bytes = _parent.getBytesTotal();
    	var bytes_loaded = _parent.getBytesLoaded();
    	if (bytes_loaded == bytes) {
    		_parent.gotoAndPlay(2);
    		this.kirupatxt = "movie loaded";
    	} else {
    		_parent.gotoAndStop(1);
    		this.kirupatxt = "loading ("+bytes_loaded+"/"+bytes+")";
    	}
    }

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