[Flashcoders] Re: showing code progress with progress bar

2008-11-24 Thread Mac Angell
Yeah, I actually do have a huge parse that I want to show progress on,
but using ENTER_FRAME just seems like a hack. So I guess the answer to
my question is no. Thanks everyone for the ideas!

 

 

 Yikes! I don't think he actually wants the loop to take any longer
than

 necessary. I'm assuming he's got some sort of computationally
expensive

 operation (huge parse or something) that he wants to show the
progress. How

 about subdividing your loop into more manageable chunks that get
called once

 a frame?

 

 -- 

 -jonathan howe

 

-Mac Angell

 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] showing code progress with progress bar

2008-11-21 Thread Mac Angell
Is it possible to show the progress of a code loop on a progress bar?
For example, if I have a progress bar named pbar already defined on
the stage, and I execute the following function:

 

private function init():void

{

  var total:int = 10;

  for (var i:int = 0; i  total; i++)

  {

pbar.setProgress(i, total);

stage.invalidate();

  }

}

 

The progress bar jumps from 0% to 100% after a long pause (the for loop
executing). I am pretty sure this happens because the entire code loop
executes before the next frame gets rendered. As you can see I even
tried stage.invalidate(), but my guess is that it just tells the stage
to update on the next frame, instead of forcing the stage to update at
that exact time.

 

Is there any way to get this to work in AS3? In other words, is there
any way to force the screen to update in the middle of a code thread?

 

Thanks!

 

-Mac Angell

 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Zipping in AS3

2008-09-24 Thread Mac Angell
 It is true that FZip can't read ZIPs created with the MAC OS X Archive


 utility, or any ZIP that makes us of data descriptors.

 

 For your other problem, i created a very simple Flex AIR app that
tests 

 roundtripping (creates a ZIP and loads it back in):

 

 http://codeazur.com.br/lab/fzip/examples/RoundTrip.mxml

 

 Works here..

 

 And yes, in AIR the Adler32 limitation doesn't apply, so you should be


 able to load any ZIP (minus those that make use of data descriptors). 

 You only need the injection hack if you use FZip in the plugin (and if
i 

 recall right Flash Player 10 is going to fix that but i didn't find
the 

 time to check).

 

 Cheers,

 Claus.

 http://codeazur.com.br/

 

 

Thanks Claus! Your example helps quite a bit.

 

-Mac

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Zipping in AS3

2008-09-22 Thread Mac Angell
Mac Angell wrote:

 

 Hey everyone! I'm trying to find a solid zip/unzip library for AS3.
I've

 done some testing with both FZip and AS3 Zip, and I've been running
into

 problems with both. So I'm wondering if there are any others out
there

 that anyone knows about that have been tested extensively. Or if any
of

 you know of any applications/sites that use FZip or AS3 Zip that I
could

 see a demo/source code of, that might help me get over some hurdles
as

 well.

 

What's your problem with FZip?

 

Cheers,

Claus.

http://codeazur.com.br/

 

Hey Claus, one of the reasons I can't use it is because of its inability
to work with a .zip file created on Mac OSX. The other reason, is that
I've attempted to use it to write out a .zip file, and I can't get it to
produce a valid .zip file. I've even tried loading in a .zip, and then
saving it out directly, and that doesn't seem to work.  I have only
tested this with AIR, so I assume I don't need to be testing this with a
.zip file that contains the Adler32 checksum. Do you have a working
example of this working with FZip? If so, I'd love to take a look at it.
Thanks!

 

-Mac

 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Zipping in AS3

2008-09-18 Thread Mac Angell
 

Hey everyone! I'm trying to find a solid zip/unzip library for AS3. I've
done some testing with both FZip and AS3 Zip, and I've been running into
problems with both. So I'm wondering if there are any others out there
that anyone knows about that have been tested extensively. Or if any of
you know of any applications/sites that use FZip or AS3 Zip that I could
see a demo/source code of, that might help me get over some hurdles as
well.

 

Thanks in advance!

 

Mac Angell

[EMAIL PROTECTED]

 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders