Table of Contents

x position

Description

The block holds its sprite’s X position. This block can be displayed as a Stage monitor.

Example

The example demonstrates the use of clone and gliding function in Sprite. 

The example demonstrates the use of clone and gliding function in Sprite:

  1. Whenever the sprite is clicked, a clone is created.
  2. When a clone is created its position is set to a random position on the top of the stage and then it glides down to the bottom.
  3. When it reaches the bottom, the clone is deleted.

Script

Output

Read More
The example demonstrates how to add gravity into the project on a bouncing ball.

Script

  1. Main Script to change the speed and position parameters of the ball.
  2. Custom function to initialize the ball position and speed with random variables.
  3. Custom function to check the boundary conditions and set the rules.

Output

Read More
All articles loaded
No more articles to load