Copy link to clipboard
Copied
Hi, I got stuck, I want to show my moving object (called "bulat") position in the dynamic text (called "posisix" for the x-axis and "posisiy" for the y-axis ). as all I know in action script adobe flash, we can use as simple as
posisix.text = bulat._x
so I'm trying this for adobe animate HTML5
var ini = this
this.addEventListener("tick", jalanbulat.bind(this));
function jalanbulat() {
ini.bulat.x += 10;
ini.bulat.y += 10;
$("#posisix").val(bulat.x);
$("#posisiy").val(bulat.y)
}
Of course it didn't work, I know it couldn't be as simple as that, but I have no idea, could anyone please help me on this? thank you.
it's solved. I changed the script to:
var ini = this
this.addEventListener("tick", jalanbola.bind(this));
function jalanbola() {
ini.bulat.x += 10;
ini.bulat.y += 10;
ini.posisix.text = ini.bulat.x;
ini.posisiy.text = ini.bulat.y;
}
and it's work just like what I want.
Copy link to clipboard
Copied
it's solved. I changed the script to:
var ini = this
this.addEventListener("tick", jalanbola.bind(this));
function jalanbola() {
ini.bulat.x += 10;
ini.bulat.y += 10;
ini.posisix.text = ini.bulat.x;
ini.posisiy.text = ini.bulat.y;
}
and it's work just like what I want.
Copy link to clipboard
Copied
Halo,
Dari Indonesia kah ?
Copy link to clipboard
Copied
iya, saya dari indonesia.