swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Swftools-common] issues with a loader


From: Huub Schaeks
Subject: RE: [Swftools-common] issues with a loader
Date: Mon, 9 Jun 2008 10:26:18 +0200

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: address@hidden
> To: address@hidden
> 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 <address@hidden> 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
>
>


Plan je evenement, nodig mensen uit en deel je foto's met Windows Live Events

reply via email to

[Prev in Thread] Current Thread [Next in Thread]