forwardingController Library Method
Short Description: Creates a forwarding / transparent controller
Signature: taccgl.forwardingController ()
Class: taccgl Class
Creates and returns a forwaring controller that forwards
mouse events during the animation to the remaining real HTML
elements on the screen. To acticate use useController.
Please read Controller Class about the purpose of
controllers in general.
In the following two examples you can compare the bahaviour
of the blocking and the forwarding controller. Click on run
multiple times, while the previous animation is still running.
With the blocking controller you should notice that the link is
blocked, while the animation is running and so it can be started
just once. With the forwarding controller, you can start and run
it multiple times simultaneously.
Examples
taccgl.useController(taccgl.blockingController()); var a=taccgl.a("testimg").paint().to (0,1000,0).start(); | RUN |
taccgl.useController(taccgl.forwardingController()); var a=taccgl.a("testimg").paint().to (0,1000,0).start(); | RUN |
Note (1) that there is a good chance that animations cannot runs simultanously,
and therefore it is much safer to avoid that animations can be started simultaneously.
The blocking controller is however not sufficient in that, so we very much recomment
reading .
Note (2)
The forwaring works only with real HTML elements. In the following example
the "run" link is animated as well and so does not work despite the use of
the forwarding controller. On the other hand due to the forwarding controller
the other links, including the examples above, work during the animation.
taccgl.useController(taccgl.forwardingController()); var a=taccgl.a("testimg").paint().to (0,1000,0).dur(4).start(); var b=taccgl.actor("ex1").to (500,1000,0).dur(4).start(); | RUN |
taccgl.useController(taccgl.forwardingController()); var a=taccgl.a("testimg").paint().to (0,1000,0).dur(4).start(); var b=taccgl.actor("ex1").dur(4).start(); | RUN |
taccgl.useController(taccgl.forwardingController()); var a=taccgl.a("testimg").paint().to (0,1000,0).dur(4).start(); var b=taccgl.a("ex1").paint().opacity(0).opacityFinal().dur(4).start(); | RUN |
In the second example above the "run" link still does not work during animation.
This is because the example box is still drawn with taccGL, just not moving.
Although this has the advantage of honoring the z-coordinates it has the disadvantage
of disabled links.
|