Highlighted

Anyone help me please..

Explorer ,
Jun 16, 2020

Copy link to clipboard

Copied

var _this = this;

_this.gotoPlayBtn.on('click', function()
{
	_this.gotoAndPlay(216);
});

window.addEventListener("keydown", function(e)
{
	if (e.code === "Space")
		_this.gotoAndPlay(216);
});

 

I tried to use "Space" and "Enter" key. They worked well.

But I wonder why other keys(ex: p key, s key , alt key, ctrl key and etc) except Space and Enter key don't work.

How can I use other keys(ex: p key, s key , alt key, ctrl key and etc) except Space?

 

Thank you.

I came to know the way.

"KeyP" or "KeyS" works well.

Views

44

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Anyone help me please..

Explorer ,
Jun 16, 2020

Copy link to clipboard

Copied

var _this = this;

_this.gotoPlayBtn.on('click', function()
{
	_this.gotoAndPlay(216);
});

window.addEventListener("keydown", function(e)
{
	if (e.code === "Space")
		_this.gotoAndPlay(216);
});

 

I tried to use "Space" and "Enter" key. They worked well.

But I wonder why other keys(ex: p key, s key , alt key, ctrl key and etc) except Space and Enter key don't work.

How can I use other keys(ex: p key, s key , alt key, ctrl key and etc) except Space?

 

Thank you.

I came to know the way.

"KeyP" or "KeyS" works well.

Views

45

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 16, 2020 0
Explorer ,
Jun 17, 2020

Copy link to clipboard

Copied

I came to know the way.

"KeyP" or "KeyS" works well.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2020 0