0
How to make the buttons on my code functuon properly?
Hey all. I've made a animation that makes a box make it's way around a container. I added 2 buttons, "start" and "stop". Once the "start" button is pressed the box starts moving in an endless loop around the container. Problem is, once I press the "stop" button, the box goes back to it's starting position, but when I press "start" the box only goes back and forth with no up and down movement. Any help would be very much appreciated :) https://code.sololearn.com/WbEjZD6iNOhd/?ref=app
1 Odpowiedź
0
// box.style.left = '0px';
// box.style.top = '0px';
// box.style.right = '50px';
// box.style.bottom = '50px';
// posR = 0;
// posL = 150;
// posU = 0;
// posD = 150;
Is this?!
https://code.sololearn.com/WMTVWafAqA7P/#js