A Flash Developer Resource Site

Page 2 of 9 FirstFirst 123456 ... LastLast
Results 21 to 40 of 172

Thread: loaded Movies and preloaders

  1. #21
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522

    Milosav...?

    I'd like to see the multiple SWF example movies you make...how can I get them from you???
    Foochuck
    http://www.myspace.com/foochuck

  2. #22
    Member
    Join Date
    Dec 2002
    Posts
    37

    movie clips

    I don't have the movie clips here.. it's not published yet? Is that what you were referring to?

  3. #23
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    I was replying to Milosav's post...
    Foochuck
    http://www.myspace.com/foochuck

  4. #24
    Senior Member
    Join Date
    Nov 2002
    Posts
    195
    Hi foochuck and nklein,

    First to load a .swf file into a Movie Clip container.

    I have flash MX so I hope the menu's are the same on your
    version.

    1.Open a New file.
    2.Open the Insert menu select New Symbol.In the name field call
    it empty_mc and for Behaviour select Movie Clip. Press OK.
    3.Open the Library. You should see an icon for the empty_mc
    Movie Clip Symbol. Drag it onto the stage.
    4.It should appear as a white dot. Select this dot open the
    Properties panel and give it an instance name call it
    mcHolder.

    Now select the first frame of the main timeline.
    Open the Actions panel and add the following actionscript.

    stop();
    loadMovie("myMovie.swf","mcHolder");

    Save your file call it mainMovie then test movie.

    note *****In the above example you will need to change
    "myMovie.swf" to the name of a .swf file you would like to
    load. It must be in the same directory as your mainMovie.swf.

    Hope you can understand this.
    There are lots of tutorials on how do do this that give you
    a visual as well.

    As for a working example of a mutiple .swf Movie. I will
    make up a small project from 4 to 5 .swf files. And post it
    back here.

    But BEFORE I do .... what version of flash do you have???

    Milosav

  5. #25
    Member
    Join Date
    Dec 2002
    Posts
    37

    movie clip

    Milosav, thank you!

    I have flash mx as well.

    One other question... the .swf that we would like to load into the movie clip - can this be any size?? very small if needbe and it will load directly into this location.

    Looking forward to seeing what you put together and trying it out!
    Thanks again

  6. #26
    Senior Member
    Join Date
    Nov 2002
    Posts
    195
    Hi nklein,

    The size can be what ever you want. You should try it out.
    The small white dot on the Stage that represents you Movie
    Clip holder can be draged to where you want it.
    Best way is to try it.

    I will make up an Example. It will be simple graphics.
    so you can understand the ideas withou being cofused by a
    complex looking movie.

    Milosav

  7. #27
    Senior Member
    Join Date
    Sep 2002
    Location
    Texas
    Posts
    348
    i have flash mx for windows. i would love to see an example!
    thanks
    aaron

  8. #28
    Senior Member
    Join Date
    Nov 2002
    Posts
    195
    HI Aaron and nklein,

    Well here is an attached zip file it contains the first basic
    steps into preloading mutiple .swf file.

    If you look it over play around with it maybe experiment
    by loading some of your own .swf file and see the results.

    Remember the .swf files you are loading must be in the same
    directory as the MainMovie.swf that loads them.

    Of course this is just how I have this example to keep it
    simple. You can have your .swf's in other directories as
    long as you use the correct path to them.

    Post back when you want more ... I will add more to it.
    This way if you want you could work towards a more complex
    Movie with preloader bars and All the Movie Clips
    controling each other and sending each other data.

    It would take very little time for you to get to that point.
    Then you can use this knowledge in your own Movies.


    Part two ...
    loading your .swf files from buttons and controlling your
    loaded Movie Properties with buttons.
    Milosav
    Attached Files Attached Files

  9. #29
    Junior Member
    Join Date
    Dec 2002
    Posts
    13
    whne using loadmovie, how do you specify where it loads ie xy coordinates? thnx
    J

  10. #30
    Senior Member
    Join Date
    Nov 2002
    Posts
    195
    Hi juskin,

    If you had a Movie Clip instance with the instance name
    mc_holder1.

    Then you can change it's x y position with the script.

    mc_holder1._x=100;
    mc_holder1._y=100;

    or you could use a loop like this to make mc_holder1 move
    cross the Stage from left to right.

    for(i=0;i<800;i++)
    {
    mc_holder1._x=i;
    }

    As you can see once you can manipulate your Movie Clip instances
    you can now create a motion tween without using more than 1 Frame.

    If you load a .swf into a Movie Clip instance and you try and
    set it's properties before enough data is loaded, you will
    create all sorts of buggy problems. So before you change any
    Properties you must make sure that enough data has been loaded.

    This leads to a pre-loader or some sort of bytesLoaded check.

    Milosav

  11. #31
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522

    Thanks Milosav

    Thanks for the file Milosav..I have Flash MX as well.

    I was wondering how to preload an swf that you are going to load into your main movie...?

    Also off the subject, I'm looking for a very simple Flash MX preloader...I don't want to use "If Frame Loaded" anymore and I can't find a simple preloader that works.

    Please advise!

    Thanks
    Foochuck
    http://www.myspace.com/foochuck

  12. #32
    Member
    Join Date
    Dec 2002
    Posts
    37

    zip?

    Milosav, good morning!
    I am on a Mac - is there anyway I can still get those files from you?? I'm very interested in playing around with this later after work. Thanks a million!
    Nicole

  13. #33
    Senior Member
    Join Date
    Sep 2002
    Location
    Texas
    Posts
    348
    Thanks a bunch milosav! that helps alot. can't wait for part two with the buttons!

  14. #34
    Senior Member
    Join Date
    Nov 2002
    Posts
    195
    Hi,

    justplainsoccer here is part Two it is an extension of
    part one the only real addition is the buttons some to
    load the three .swf's and some to change the Properties
    of the Movie Clip instances that they are loaded into.

    You should not find it much of a jump from part one. Only
    the MainMovie is different.

    Without moving from Frame 1 in MainMovie we load in three
    external .swf files, move them, alpha them and more.

    foochuck If you have a main movie called MainMovie and an
    external .swf file being loaded called Movie1.swf.

    In Movie1 leave Frame 1 blank except for a stop(); action.
    Start the rest of your Movie on frame two.

    Then in your main movie something like the following script.

    Where mc_holder is the Movie Clip instance you are loading into.

    loadMovie("Movie1.swf","mc_holder");


    loaderInterval=setInterval(loadChecker,100);
    function loadChecker(){

  15. #35
    Senior Member
    Join Date
    Nov 2002
    Posts
    195
    Well SORRY!@!@!# about that.

    I just hit the wrong key ... so where were we ....

    Hi,

    justplainsoccer here is part Two it is an extension of
    part one the only real addition is the buttons some to
    load the three .swf's and some to change the Properties
    of the Movie Clip instances that they are loaded into.

    You should not find it much of a jump from part one. Only
    the MainMovie is different.

    Without moving from Frame 1 in MainMovie we load in three
    external .swf files, move them, alpha them and more.

    foochuck If you have a main movie called MainMovie and an
    external .swf file being loaded called Movie1.swf.

    In Movie1 leave Frame 1 blank except for a stop(); action.
    Start the rest of your Movie on frame two.

    Then in your main movie something like the following script.

    Where mc_holder is the Movie Clip instance you are loading into.

    //start movie load
    loadMovie("Movie1.swf","mc_holder");

    //set an interval that will call loadChecker() every
    //100 milliseconds.
    loaderInterval=setInterval(loadChecker,100);

    //the function to check the bytes loaded
    function loadChecker(){
    //check the data transfer
    if(mc_holder.getBytesLoaded()>=mc_holder.getBytesT otal() && mc_holder.getBytesLoaded()>0)
    { //if the above conditional statement is "true" then play
    //the loaded movie.
    mc_holder.play();
    //stop the interval that you created
    clearInterval(loaderInterval);
    }
    }

    The example files for Part three.. should be posted tomorrow.
    They include a very effective method of creating a loader bar
    available from anywhere any time.

    nklein I only work on windows ... but I am sending files to
    another forum member who is on a mac I have assumed from our
    conversation that he has been able to use them ?????

    Any ideas about that ?????
    My files are Flash MX windows version it would seem really
    strange to me if you could not share flash files between
    Windows and Mac, what about large design teams working on
    seperate home platforms ??? Tell me this is not so!!!!!

    Milosav



















    function loadChecker(){t push the wrong key..
    Attached Files Attached Files

  16. #36
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522

    Preloader Sample...?

    Milosav,

    Thanks for the preloader..I was wondering if you could send me a demo of this preloader in action...I'd like to see how you would use it...I'm just not sure where to place the script you gave me..if I put it in my main movie and the script comes up before the movie is loaded will that cause a problem...Either way I'd like to see a sample of what you explained IF possible.

    Thanks for your time.
    Foochuck
    http://www.myspace.com/foochuck

  17. #37
    Member
    Join Date
    Dec 2002
    Posts
    37

    file type??

    Sorry guys.. I'm way up at the beginning of the posted files. Any way to get them stuffed for a mac vs a pc zip. I can't open the files. thanks!

  18. #38
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    I'm also interested to know how to Unload a movie from a movie clip...it's probably easy but it would be nice to know how...

    Thanks!
    Foochuck
    http://www.myspace.com/foochuck

  19. #39
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Sorry one more note..I'd like to unload the loaded movie from the movie clip WITH a button...
    Foochuck
    http://www.myspace.com/foochuck

  20. #40
    Senior Member foochuck's Avatar
    Join Date
    Aug 2000
    Location
    Estero, FL
    Posts
    522
    Sorry to be a pain.I have a couple other questions..I noticed when loading a movie over another the buttons in the background movie still hilite and can be clicked (even though the loaded movie covers the other) is there any way to get around this?

    Also I've loaded movie1.swf into movie.swf...movie1.swf contains an audio file that plays..it works when launched by itself but when loaded into movie.swf it doesn't play...what could I be doing wrong? Please advise...

    Foochuck
    http://www.myspace.com/foochuck

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