dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Loading movieclip

  1. #1
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    HI,

    I got problem with loading this:

    Main_movie.swf link to 5 external swf, and all this external swf contain 6 to 7 movieclip.

    When i put in preloader in the main movie it work, but still very slow, look like working but seen like never load my movieclip, so when main_movie play will not smooth, I'm not into external swf yet. Same thing I create preloader scene in all individual external swf. I click from the main_movie to one of the external swf, a loading scene show on the screen, but didn't load at all, i mean not moving, pause on screen.

    What I want is a preloader for main_movie.swf(together with movieclip) let the movie play smoothly, when i click on the extternal swf, loading scene again(together with movieclip in this swf), same to other pages.

    Can someone help me please, because i'm totally no idea what when wrong. Thanks!

    Amiwai,




  2. #2
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    Can someone in this forum help me?

  3. #3
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    have you use getBytesLoaded() command?
    it would return a precise count on the loading process so your main_movie.swf would run smooth after being loaded.

  4. #4
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    HI Wisnuadi,

    Yes, ithink. for U info i'm totally new
    Bro, I'm not a expert so i very not understand all the script mean, Base on my problem from Begin to the end,
    Preloader for "main_movie.swf " to "load movieclip" to "external swf " load all movieclip".......

    How should put the script? Tolonglah saya.............!!!

    Thanks,


    Originally posted by Wisnuadi
    have you use getBytesLoaded() command?
    it would return a precise count on the loading process so your main_movie.swf would run smooth after being loaded.

  5. #5
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    kamu orang malay? atau indo? saya indo
    kita tetap pake inggris saja biar yg lain bisa ngerti,


    for preloader make two frame,

    1st frame,

    //this retrieve the bytes currently loaded by flash
    bytesLoaded=_root.getBytesLoaded();

    //this retrieve the total bytes of your main_movie.swf
    bytesTotal=_root.getBytesTotal();

    //this is simple calculation to translate the information into percentage
    percent=(Number(bytesLoaded)/Number(bytesTotal))*100;

    //to display the current percentage, make a dynamic text field and name it "percent"

    //this is to jump over the loop when the counter hit 100%
    if (bytesLoaded>=bytesTotal){
    gotoAndPlay(3);
    }



    2nd frame,

    //this loop your movie while your main_movie.swf is being loaded
    gotoAndPlay(1);



    this method guarantee that your movie wont played until it being fully loaded,
    apply this two frame to your main_movie.swf and any other external.swf that you planned to load,

  6. #6
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    Hi Wisnuadi,

    Yes, Malay. I'm a newbie in flash, maybe sound stupid, but just want to make sure. is the script include loading the movieclip also? Because all my movieclip attached with the external swf is very big, need to load before playing. I want a smooth movie. Thanks Man.

  7. #7
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    yes it include all the movie clip in the swf file,
    basically getBytesTotal() shows the total bytes of the swf file. Bytes not frame.

    and dont worry about being stupid, we all grow from stupidity ...lol

  8. #8
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    Hi Wisnuadi,

    Thanks, for help.
    If I got any problem later, I'll look 4 U.

    Terima Kasih.

  9. #9
    Member
    Join Date
    May 2001
    Posts
    34

    HELP !!

    Ok Wisnuadi, but where can l put the dynamic text field "percent" and (in which frame) ! in first frame? and what about the root to the external swf how can l bring him to the stage ? please help it's ergent !

  10. #10
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    put the dynamic text field "percent" along the first and second frames,

    >>and what about the root to the external swf how can l bring him to the stage ?

    I don't quite follow your question,
    you could load your external.swf directly to the stage, to your designated level using:

    loadMovie("external.swf", 1);
    "1" is level number, u could use 1,2,3 whatever,
    if you use "0" then it would replace your current main timeline,

    or you could load your external swf to a targeted movie clip using:
    loadMovie("external.swf", "yourMC");
    "yourMC" is the instance name of your movie clip

  11. #11
    Member
    Join Date
    May 2001
    Posts
    34

    great !

    Ok, sorry l'm also new to these things ! now l have the swf movie on my disktop and l made these two frames with all the scripting now how can l preload the swf movie using these codes: ("external.swf", 1) or
    (external.swf", "yourMC) (is there any downloadable example for that ? ! l am asking too many things ha :-))) ?!

  12. #12
    Member
    Join Date
    May 2001
    Posts
    34
    this is a link to my movie but l couldn't see the preload movie on the net! but l can see the pre. when l show streaming in flash player :
    http://members.chello.nl/k.mussa/omar2002.swf

    thats one. second the problem is when l click on the link as you will notice that you have to wait till the main movie loaded to start so you don't see any preload nothing just a.... !!! what l did actually l add two frames to the haid of my main movie in the first one l add this script :
    if (_framesloaded == _totalframes) {
    gotoAndStop("Scene 1", "start");
    }
    (start is the label for the third frame in the main scene)
    in the scond frame l add :
    gotoAndPlay(1);
    and on the first and scond frame l added the preload movie
    now what shall l do now please help !
    and how can l make a digital preloader if you please in Details
    [Edited by alhakeem on 07-31-2002 at 10:50 AM]

  13. #13
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    HI Wisnuadi,

    Can take a look my site, I'm using the code U give to, but seen like not working, a bit slow and not smooth, pls give ur advice. Terima Kasih Bro!

    The Link: http://deicidez.cjb.net


  14. #14
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    alhakeem,
    I cant see anything from your link
    can you send your .fla to me? my mail is wisnuadi@profescipta.com

    loadMovie("external.swf", 1); and
    loadMovie("external.swf", "yourMC");
    is for loading an external.swf,
    not for preloading your movie.


    >>if (_framesloaded == _totalframes) {
    >>gotoAndStop("Scene 1", "start");
    >>}

    your script here is working just fine,
    remember that your first two frame that contains the preload script have to be the only two frame in your main timeline,
    if you have another layers, be sure that the first two frame is EMPTY/BLANK.


  15. #15
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    oops, wrong e-mail
    mine is kwisnuadi@profescipta.com

  16. #16
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    amiwai,
    I check your site but it got stuck in 84%,
    is that what you mean by "a bit slow and not smooth"?
    If that's the case then I think u should cut your movie to about 250Kb,
    I have the same problem recently and realize that (in our region) 250Kb is the maximum/ideal size for one single movie

  17. #17
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    What 250kb! How to do it? Brother any other solution?
    Cause i'm very can't effort to cut more frame, as U know this a Portfolio website. Stuck in 84%, this very weird, for my side can go to 100%. Slow and not smooth as in when the movie is playing, if U can go into portfolio page, U will know what i mean not smooth.

    Terima Kasih Wis,


    Originally posted by Wisnuadi
    amiwai,
    I check your site but it got stuck in 84%,
    is that what you mean by "a bit slow and not smooth"?
    If that's the case then I think u should cut your movie to about 250Kb,
    I have the same problem recently and realize that (in our region) 250Kb is the maximum/ideal size for one single movie

  18. #18
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    I still cannot load it 100%,
    send it to my e-mail kwisnuadi@profescipta.com

  19. #19
    i-Think
    Join Date
    Apr 2002
    Location
    Singapore
    Posts
    344
    Hi Wis,

    Can try to go in again, please. because my site can go to 100%.

    Saw Ur Profescipta.com, Cool man.
    How to make the Pop-up without window, like yours.
    Can let me know too.

    Terima kasih.

    Amiwai




  20. #20
    Senior Member Wisnuadi's Avatar
    Join Date
    Feb 2001
    Location
    Jakarta, Indonesia
    Posts
    147
    thanks,
    it's java, I'll send it to you if you want it


    I reach 100% now, cool site
    Now I understand what you meant by 'not smooth',
    the problem is not on the script, but on your animation.
    Too many moving part in the same time, particularly moving image would seriously effect you PC performance.
    Also it would help if you make your looping animation with action script instead of frame action.

    No other word, man ....reduce it, or at least disable several looping animation particularly the big one

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