RE:Create a button which when pressed it replaces an existing object on the screen to another object in Smartface App Studio?

51 views Asked by At

After seeing @catherinelagoon's post I also having difficulty in quite understand how to replace an object using a button so is it possible to create a button which when pressed it replaces an existing object on the screen to another object in Smartface App Studio?

I tried using the answer provided in the post however I couldn't understand it much due to I'm a beginner in using Smartface App Studio and coding itself.

Thankyou and sorry for any inconvienience

1

There are 1 answers

0
halit On

After you create an image you should add it to a Page so it can show on that page. So here is a simple code for creating and showing an image on the page.

var image = new SMF.UI.Image({
        visible: false
    });
Pages.Page1.add(image);

function Page1_TextButton1_OnPressed(e) {
    image.visible = true;
}