//moves a given element on the screen //id (string) //direction (string) the element ID for the item to be moved the direction the element should be moved //amount (number) the amount of pixels the...


//moves a given element on the screen<br>//id (string)<br>//direction (string)<br>the element ID for the item to be moved<br>the direction the element should be moved<br>//amount (number)<br>the amount of pixels the element should be moved<br>function moveElement (id, direction, amount) {- E<br>var xPosition<br>getXPosition (vid) ;<br>var yPosition<br>getYPosition (vid)<br>if ( direction<br>

Extracted text: //moves a given element on the screen //id (string) //direction (string) the element ID for the item to be moved the direction the element should be moved //amount (number) the amount of pixels the element should be moved function moveElement (id, direction, amount) {- E var xPosition getXPosition (vid) ; var yPosition getYPosition (vid) if ( direction "left" ) { == setProperty (vid, v "x", xPosition amount ); } else if ( (direction "right") setProperty (vid, xPosition + amount ); x", } else if ( (direction == "up") setProperty (vid, v "y", yPosition amount ); } else { setProperty (vid, v "y", yPosition amount );
A. moveElement(

Extracted text: A. moveElement("button1", 2, 23); B. moveElement("button1", "left", "thirty"); C. moveElement("button1", 30, "two"); D. moveElement("button1", "down", 25);

Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here