Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

(blue star)

This section gives an illustrative example of using graphic file objects. Settings may differ depending on your project’s configuration.

Exercise 1: Creating a custom background image

The following is an example of setting the background image for a project page. You will import an image from an external directory.

a) Select [Edit] – [Insert Graphic File(I)] to open the file browser. Select an image you wish to insert and press the [Open] button. The image will be placed on the graphic page.

b) Adjust the image size and position as desired, then select [Arrange] – [Make Symbol]. The image will be moved to the background of the page, and will no longer be editable.

c) To replace or edit the background image, select [Arrange] – [Break Symbol]. Handles will appear around the image, indicating that you can edit it again.

d) When you are done editing the object, you can move it back into the background by selecting it and pressing [Arrange] – [Make Symbol].

Exercise 2: Grouping multiple image objects together

In this section, you will group multiple images into a single object, then apply a ‘Vertical Move’ function to the grouped object.

a) Create an analog tag in the database. Enter 'SEC' as the tag name.

b) Select [Edit] – [Insert Graphic File] to import images from the desired location. In this example, we use images of a hot air balloon and a human.

c) Resize and position the images appropriately, then drag the cursor to select both at the same time. Group the two images into a single object. Note that in this example, transparency for the balloon object has been turned on using the [Style] – [Line/Fill] – [Transparent Draw] option.

d) Go to the [Object Config] window and configure the [V-Move] feature. Choose 'SEC' for the tag name and assign the data range from 0 to 60.

e) Under the [Vertical Move] tab, select 'Bottom' as the base position and set the distance to 500. Make sure the bottom of the grouped image is at least 500 pixels from the top of the page, so that it will remain visible.

f) Create a new ‘Period’ script called 'Move' in the [Tools] – [Script] editor. Edit the contents of the script as shown below. The value of ‘SEC’ will increase by 3 every second (“SEC = SEC + 3;“). When the ‘SEC’ tag becomes greater than or equal to 60 (“If(SEC >= 60)“), the value will be reset to 0 (“SEC = 0“;).

g) Launch the project in Xpanel or the simulator. The hot air balloon object will rise for 20 seconds, then move back to the starting position.

  • No labels