Class: PlayPauseWorker

controlsPlayPauseWorker(script, text, rate, npages)

Creates a new PlayPauseWorker.

Constructor

new PlayPauseWorker(script, text, rate, npages)

Parameters:
Name Type Description
script string To be run by the Worker
text array List of words
rate int Velocity of update for the words on the screen
npages array List of word indexes corresponding to new pages
Source:

Members

decreaseIndex

Sets the previous word index
Source:

decreaseRate

Sets the previous rate, decreasing the current one by 10
Source:

getIndex

Source:

getPageIndex

Source:

getRate

Source:

getTextLength

Source:

increaseIndex

Sets the next word index
Source:

increaseRate

Sets the next rate, increasing the current one by 10
Source:

initWorker

Initiates the worker, either by defining it for the first time, or by terminating it, redefining it again. The first corresponds to the play state, The second, to the restart state. If @param restart is false, and on a playing state, the worker is set on a pause state
Source:

onPause

Source:

postMessage

Sends the message with the data to the module called by the worker
Source:
Fires:

setIndex

Sets the current word index
Source:

setPage

Sets the current page index
Source:

setPageIndex

Sets the current page index based on the @param index
Source:

setRate

Sets the current rate
Source:

setText

Sets the words on the screen
Source:

terminate

Terminates the worker, setting it on a pause state
Source: