Timeline efficiency
Colzie
Posts: 470
I have a timeline that, at various times, I need to run through one time. Which is the more processor efficient way to handle this?
OPTION A:
Every time I need the timeline to run, kill it if it is running, then use TIMELINE_CREATE with the TIMELINE_ONCE parameter.
OR
OPTION B:
Create the timeline once with the TIMELINE_REPEAT parameter. Pause the timeline when I don't need it. When I do need it to run, use TIMELINE_SET to 0, and restart the timeline, pausing after it runs through one time.
I am using the timeline to refresh dynamic images that the user can cycle through, so I may not need the timeline for a long time (which makes me lean to Option A). When I do need it, it will probably be used repeatedly while the user pages through the images (which makes me lean to Option .
??
OPTION A:
Every time I need the timeline to run, kill it if it is running, then use TIMELINE_CREATE with the TIMELINE_ONCE parameter.
OR
OPTION B:
Create the timeline once with the TIMELINE_REPEAT parameter. Pause the timeline when I don't need it. When I do need it to run, use TIMELINE_SET to 0, and restart the timeline, pausing after it runs through one time.
I am using the timeline to refresh dynamic images that the user can cycle through, so I may not need the timeline for a long time (which makes me lean to Option A). When I do need it, it will probably be used repeatedly while the user pages through the images (which makes me lean to Option .
??
0
Comments
If you need it to refresh a dynamic image, there is no need to use a timeline
Here is (some of) the relevant code:
button_event[dvTP, nSomething]
{
push:
{
cancel_wait "DoSomething"
}
release:
{
wait 5 "DoSomething"
{
// Something
}
}
}