It's not an issue of getting the correct size, its that the Flash file
doesn't seem to obey the stop() on frame 1 when doing a simulate download
test.
Steps:
1. Create a new Flash file.
2. On frame 1, add
stop();
trace("start");
3. On frame 5, add
stop();
trace("stopped");
Test the movie by pressing control-enter.
output: start
Use "simulate download" (control-enter again), and for some reason, flash
skips the stop action on frame 1.
output: start
stopped
So Flash traces "start" on frame 1 actionscript, but ignores the stop(). I
can work around the problem, but its something that I didn't see before.
- John
On 12/12/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
Message: 11
Date: Tue, 12 Dec 2006 11:35:25 -0800
From: "Mick G" <[EMAIL PROTECTED]>
Subject: Re: [Flashcoders] frame 1 - stop() not working with simulate
download
To: "Flashcoders mailing list" <[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
I've seen this behavior when using if(bytesLoaded==bytesTotal) and not
checking if the bytesLoaded is > 1K (or some small file size) to be
sure it has started loading.
So... use--> if(bytesLoaded==bytesTotal && bytesLoaded>1024)
On 12/12/06, John Olson <[EMAIL PROTECTED]> wrote:
> I'm not sure why I never noticed this after so many years, but I was
doing a
> demo for someone the other day and Flash was doing some weird things.
It
> was an old school preloader demo with a stop() and an onEnterFrame loop
on
> frame 1 that checked the bytes loaded and bytes total. I was bandwidth
> testing and it kept ignoring my stop() on frame 1. It worked fine if I
was
> testing the movie normally, but would run right past the stop() on frame
1
> when I did the Simulate Download.
>
> For my demo, I just moved everything to frame 2 and it worked fine, but
it
> was extremely odd. I was more puzzled because I'm not sure how I didn't
see
> this before (or don't recall it happening before).
>
> Is this a known issue with Simulate Download? I know there are issues
that
> Simulate Download doesn't clear out all variables and objects from
memory,
> but I found it odd that it was skipping/ignoring the stop() action.
>
> - John
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
------------------------------
Message: 12
Date: Tue, 12 Dec 2006 11:39:15 -0800
From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]>
Subject: RE: [Flashcoders] frame 1 - stop() not working with simulate
download
To: "Flashcoders mailing list" <[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
An empty movieclip has a size of 4 bytes so you check to see if the
bytesTotal > 4 in addition to the percent loaded == 100.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com