[Laszlo-user] Stop for animator and animatorgroup

André Bargull a.bargull at intensis.de
Mon Jul 16 07:06:10 PDT 2007


Hello Srini Raja,
this is apparently just a simple bug, filed as "LPP-4295" under 
"http://www.openlaszlo.org/jira/browse/LPP-4295".
Now you've got two options:
-set the "isactive"-flag manually for your nested animator. (That'd be 
quite lame...)
-overwrite "LzAnimatorGroup#update(..)" in a script-block at the very 
beginning of your application. (IMHO this is a better approach)

[code]
  <script>
    //LzAnimatorGroup.addProperty("update", function update( time ) 
{..});//OpenLaszlo4.x-style
    LzAnimatorGroup.prototype.update = function( time ) {
        #pragma "warnUndefinedReferences=false"
        var animend = this.process == "simultaneous" ? 
this.actAnim.length -1 : 0;
        if ( this.paused ) {
            return;
        }
       
        for (var i = animend; i >= 0 ; i-- ) {
            var a = this.actAnim[i];
            if (a.notstarted) {
                a.isactive = true;
                a.prepareStart();
                a.notstarted = false;
            } else if (a.needsrestart) {
                a.resetAnimator();
                a.needsrestart = false;
            }
       
            if ( a.update( time ) ) {
                this.actAnim.splice( i, 1 );
            }
       
        }
       
        if ( ! this.actAnim.length ) {
            return this.checkRepeat();
        }
        return false;
    };
    //});//end: OL4.x-style
  </script>
[/code]

Best regards,
André

Srini Raja wrote:
> Hi,
>
> If I do a stop() an <animator> and restart it using doStart(), it works
> fine. 
>
> If I do the same for <animatorgroup>, the doStart() doesn?t start the
> animation again. 
>
> I am attaching 2 lzx code samples one with animator and the other with
> animatorgroup.
>
> The version of openlaszlo is 3.4.x and runtime is flash.
>
> I don?t have a 4.x environment to see if this problem can be reproduced
> there. 
>
> Help me if I am missing something in the way I invoke animatorgroup.
>
> Srini Raja

-- 
Mit freundlichen Grüßen,
André Bargull
Intensis GmbH

Tel.: +49 (0)231 5522-900
Fax.: +49 (0)231 5522-901
E-Mail: a.bargull at intensis.de
________________________________
Intensis GmbH
Ruhrallee 9
44139 Dortmund



More information about the Laszlo-user mailing list