Hello Pablo
I played around a bit with implementing a running counter with swfc (cvs
version) and afterwards tried to apply that to your loader. Since I don't have
access to all the files you use, I cannot really test it, but you may want to
try this:
change the first part of your loader script to:
.frame 1
.put first_slide
.put loader
.action:
slide_height=Stage.height;
slide_width=Stage.width;
counter_percent=(slide_width/800)*100;
loader._x = slide_width-(loader._width*(counter_percent/100)*1.05);
loader._y = slide_height-(loader._height*2.5);
loader._xscale=counter_percent;
loader._yscale=counter_percent;
.end
.frame 2
.action:
loading = (String (Math.round ((_root.getBytesLoaded() / 1024))) + " KB
/ " + String (Math.round ((_root.getBytesTotal() / 1024))) + " KB " + " (" +
String (Math.round ((_root.getBytesLoaded() * 100) / _root.getBytesTotal())) +
"%)" );
.end
.frame 3
.action:
if (_root.getBytesLoaded() < _root.getBytesTotal())
gotoAndPlay (2);
.end
and, of course, change your frame 3 to frame 4 further down.
Regards
Huub
> Date: Sun, 8 Jun 2008 22:34:54 +0200
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: [Swftools-common] issues with a loader
>
> Pablo Rodríguez wrote:
> > Matthias Kramm wrote:
> >> On Sun, Jun 08, 2008 at 12:39:53PM +0200, Pablo Rodríguez <[EMAIL
> >> PROTECTED]> wrote:
> >>> Ok, but how can I merge both? (I have no idea on how to distinguish the
> >>> code from the loader and the presentation in the same swfc file.)
> >> Well, your loader loops between frames 1 and 2 until the whole file is
> >> loaded, right?
> >> So just start the presentation in frame 3 instead of 1.
> >
> > Many thanks for your reply, Matthias.
> >
> > The loader works as expected (), but _root.getBytesLoaded() seems to
> > count only when the file is completely loaded.
>
> After playing with the swfc script
> (http://ousia.justfree.com/loader-orphanworks-script.txt), I'm afraid
> that the loader counting doesn't work
> (http://ousia.justfree.com/orphanworks.swf).
>
> I have the impression (although I have no idea on how this works and I
> may be wrong) that only frame 1 is loaded right after is downloaded, all
> other frames are loaded after the whole file is downloaded.
>
> Just in case it might help,
>
>
> Pablo
>
>
_________________________________________________________________
De mooiste afbeeldingen van Angelina Jolie vind je met Live Search
http://search.live.com/images/results.aspx?q=angelina%20jolie&FORM=MIINTM