@manuelapblanco
Take a look here…
https://www.wix.com/velo/reference/$w/hiddenmixin/show
You can set-up the " delay ", " duration ", " direction " and some other animation-options, like for example the " intensity " as you want.
For this, you set up “options” for every animation.
Let us take the —> " fade "- animation .
It has the following OPTIONS …
let fadeOptions = {
"duration": 2000,
"delay": 1000
};
$w("#myElement").show("fade", fadeOptions);
As you can see, the FADE-ANIMATION has just 2-OPTIONS, which can be setted-up. Because it has for example → NO DIRECTION.
Now back to your EXAMPLE!
// User-Interface-----------------------------------------
var fadeDURATION = 500
var fadeDELAY = 50
// User-Interface-----------------------------------------
$w.onReady(()=>{
let fadeOptions = {
"duration": fadeDURATION,
"delay": fadeDELAY
};
let sentence1 = $w('#text26')
let sentence2 = $w('#text86')
let sentence3 = $w('#text96')
let myButton = $w('#button1')
setTimeout(()=>{ sentence1.hide('fade'); sentence2.show('fade')}, 4000)
setTimeout(()=>{sentence2.hide('fade'); sentence3.show('fade')}, 8000)
setTimeout(()=> {myButton.show('fade')}, 13000)
})
The same way you can EXPAND your ANIMATION-OPTIONS for every kind of ANIMATIONS!
CORRECTION: Sorry forgot something in the CODE!
// User-Interface-----------------------------------------
var fadeDURATION = 500
var fadeDELAY = 50
// User-Interface-----------------------------------------
$w.onReady(()=>{
let fadeOptions = {
"duration": fadeDURATION,
"delay": fadeDELAY
};
let sentence1 = $w('#text26')
let sentence2 = $w('#text86')
let sentence3 = $w('#text96')
let myButton = $w('#button1')
setTimeout(()=>{
sentence1.hide('fade', fadeOptions);
sentence2.show('fade', fadeOptions)
}, 4000)
setTimeout(()=>{
sentence2.hide('fade', fadeOptions);
sentence3.show('fade', fadeOptions)
}, 8000)
setTimeout(()=> {
myButton.show('fade', fadeOptions)
}, 13000)
})