MC Loading an External File

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default MC Loading an External File

    I have a flash website which I want it to load an external swf file and show
    its loading progress.

    I created a movie clip (my_mc) and use the loadmovie command to load the
    external.swf. I placed a dynamic text (var: Progress) to display BytesLoaded.

    The problem is that the var Progress shows 12 Bytes which is the size of the
    my_mc without the external swf (external swf is 93KB).

    Can anyone help PLEASE ?? The code that I have is shown below:

    ///Scene 1 Frame 7

    loadMovie("external.swf", my_mc);
    gotoAndPlay("Scene1", 8);

    ///Scene 1 Frame 8

    Progress = my_mc.getBytesLoaded();
    if (my_mc.getBytesLoaded() == my_mc.getBytesTotal()){
    stop();
    }
    else
    gotoAndPlay("Scene1", 9);

    ///Scene 1 Frame 9

    gotoAndPlay("Scene1", 8);

    RESULT: The external.swf loads and the Progress dynamic text shows the value
    12! But I know that the external swf file is at least 93KB!

    tyberius7 Guest

  2. Similar Questions and Discussions

    1. simply loading an external file
      ok mabie its too early in the morning but i know it has to be pretty simple . How do i load an external file (in this case an excel worksheet) from...
    2. Loading an array from an external file
      It's about "asymmetry" in LoadVars(). I want to load an array, but didn't know how to actually story it in the external file. So I used...
    3. Loading w3d file from a external folder
      Hi all, im doing a application using director. I need to do buttons to load my w3d files from a external folder to the stage while running the...
    4. Loading external file from C:\bobby\
      I know this hsa been covered before but I can't find it. I am building some training for a CD/HD install and I need to read some info from a txt...
    5. Loading an external html file from an URL
      I'm having some trouble getting Flash to load an external html file into a dynamic text box from an URL, can anyone point me to a tutorial? ...
  3. #2

    Default Re: MC Loading an External File

    The condition

    my_mc.getBytesLoaded() == my_mc.getBytesTotal()

    will be true the 10% of the time you try it. There are well know problems with
    the 'load API' of
    Flash, depending also on the browser you're using (if any).

    More details here:
    [url]http://www.moock.org/blog/archives/000010.html[/url]

    HTH,

    -c.

    CesareRocchi Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139