top of page

Interval-function

This car is ----> 

. . .

STOP
Play
CODE
improved CODE

working code ---> improved code

CODE

CLOSE.png

var i = 0

var myTimerValue = 3000

var myArray = ["fast", "expensive", "useful", "a womanizer", "super-fast", "economic", "a monster"]

var myVar = setInterval(myFunction, myTimerValue);


 

$w.onReady(function () { })

 

export function BTNplay_click(event) {myFunction()}

export function BTNstop_click(event) {stopFunction()}

 

function myFunction() {

    if (myArray[i]===undefined) {$w('#text1').text="END", stopFunction(), console.log("Function stopped")}

    return $w('#text1').text=myArray[i], i = i+1}

 

function stopFunction() {clearInterval(myVar);}

improved-CODE

CLOSE.png

var i = 0 

var counter=0

var myTimerValue = 3000

var myArray = ["fast", "expensive", "useful", "a womanizer", "super-fast", "economic", "a monster"]

let myVar = setInterval(myFunction, myTimerValue);

 

$w.onReady(function () { })

 

export function BTNplay_click(event) {$w('#BTNstop').enable(), myVar = setInterval(myFunction, myTimerValue);}

export function BTNstop_click(event) {$w('#text1').hide('fade'); $w('#BTNstop').disable(), stopFunction(), setTimeout(()=>{myVar},100)}

 

function myFunction() {console.log(counter++)

    $w('#text1').hide()

    $w('#text1').show('fade')

    $w('#BTNstop').enable()

    if (myArray[i]===undefined) { i = 0,

     $w('#text1').text="END", stopFunction(), console.log("Function stopped")

     setTimeout(()=>{myVar = setInterval(myFunction, myTimerValue)},2000)

 

    }

    else {

        return $w('#text1').text=myArray[i], i = i+1} $w('#BTNstop').disable()}

 

function stopFunction() {clearInterval(myVar);}

Comment-Box

CLOSE.png

Version-1.0

Under_Construction.png

Leave a comment. . .

Arrow.png

General-Settings

ON                 OFF

Show Text-Length

ON                 OFF

max. Text-Length

ON                 OFF

Show Key-Press

ON                 OFF

Show Key-Code

ON                 OFF

Show Total-Count

Character-limit

Load default settings
Save
mr-money-man 00:22:20

You can use also the CHAT if you want

 

8.8.2020
mr-money-man 00:22:01

Welcome back on my site ^^

8.8.2020
barbarabessals2 19:21:42

hello!

07/08/2020
mr-money-man 23:52:46

Hello Barbera ^^

7.8.2020
arthurvalatin 07:33:29

hello

04/08/2020
russian-dima 00:15:35

You can also set your own CHARACTER-LIMITATION in the SETTINGS but at moment 240
-characters are the max.

30.7.2020
arthurvalatin 07:13:39

hello!

30/07/2020
russian-dima 00:11:43

PRESS "TAB+ENTER" and you will see how it works without the button xD

30.7.2020
russian-dima 00:10:23

For example it is possible to send messages without to click everytime with the
mouse onto the button xDD

30.7.2020
russian-dima 00:09:45

You will find a lot of hidden intergrated stuff in my little comment/chat-tool ^
^

30.7.2020
arthurvalatin 07:09:33

Hello!

30/07/2020
russian-dima 00:08:44

Check it out! It almost works like a CHAT-BOX

30.7.2020
Page 1 of 1
Design
Settings
About
CLOSE.png
Leave a comment, or start a chat.

Post-Comment

- - -

Pressed-Key

- - -

Key-Code

Text-Length

- - -

max. Text-Length

- - -

Number of Comments

- - -

designed & developed by russian-dima

Write a comment
bottom of page