5 Replies Latest reply on Jul 13, 2008 7:23 PM by kglad

    loadClip stop

    terablade2001 Level 1
      Hi.

      Recently I came up with a problem: I want to stop loading procedures that have start with loadClip() function.

      Example: Suppose that I am loading a huge picture ~2MB in my swf file with loadClip() and I track it's progress with onLoadProgress() function. I also have a button X, that I want to cancel the loading when pressed. Is there any way to do it?
        • 1. Re: loadClip stop
          kglad Adobe Community Professional & MVP
          not with as2, yes with as3.
          • 2. Re: loadClip stop
            terablade2001 Level 1
            Thanks for the reply kglad.

            Still I read the following from help of Flash:

            public unloadClip(target:Object) : Boolean
            Removes a movie clip that was loaded by using MovieClipLoader.loadClip(). If you issue this command while a movie is loading, MovieClipLoader.onLoadError is invoked. That probably means that it stop it, doesn't it?-(fail to load)... Hm.. Although I was testing it via Flash and it seems like it was work, testing it online it seems that it doesn't stop the loading.! :( .. Why then to invoke onLoadError?

            From my internet search, I also read that AS3 offers the capability of Pausing/Resuming loading.

            Thus, I have one more critical quesiton:
            Is it possible to use AS3.0 scripts into one of my AS2.0 projects? - Just to use the classes of AS3 for loading clips, into my AS2 project?.
            • 3. Re: loadClip stop
              kglad Adobe Community Professional & MVP
              you can't stop the upload once it's started in as2.

              and no, you can't use as3 code in an as2 swf. you must publish for as3 to use as3 code/classes. and in that case, all your code must be as3 code.
              • 4. Re: loadClip stop
                terablade2001 Level 1
                Thanks kglad... :)

                From today I started reading and learning AS3 (or else I can not finish some works!!!)... I guess AS2 in 1-2 years from now will be "dead"....AS3 offers much more capabilities for creativity from what I read. + It's fully OOP... Reminds me C++! :D

                • 5. Re: loadClip stop
                  kglad Adobe Community Professional & MVP
                  as2 won't be dead in a few years. even as1 is still supported by the latest flash player.

                  but a greater percentage of flash projects will be written in as3 a few years from now. that's a sure thing.