VR 360 Panorama event handlers not working

Contributor ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Hi. I am following this tutorial

https://blog.adobe.com/en/2019/06/27/adding-interactivity-to-vr-360-content-in-animate-2019.html#gs....

 

and trying to get the event handler:

AnEvent.MOUSE_DOWN

 

to work, but it won't work. I'm trying to get it to trigger an alert to test it.

I was able to get 

AnEvent.MOUSE_OVER

to successfully trigger an alert.

 

Here is my code:

 

this.movieClip_2.addEventListener(AnEvent.MOUSE_OVER, mouseover);

function mouseover()
{
alert("Moused over");
}

 

this.backg.addEventListener(AnEvent.MOUSE_DOWN, mousedown);

function mousedown()
{
alert("Moused down");
}

 

Any help?

TOPICS
Error, Missing feature, Other, Product issue

Views

73

Likes

translate

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
community guidelines
Contributor ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

You know, this is really expensive software for not offering any customer support... I could be using Unity which blows Animate out of the water and is free, not to mention any of the other free programs that have more robust customer support...when they're free...

Likes

translate

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
community guidelines
Adobe Community Professional ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

Hi.

 

Sorry for the delay in answering.

 

I usded the code below and everything worked as expected.

{
	var _this = this;

	_this.movieClip_2.addEventListener(AnEvent.MOUSE_OVER, function()
	{
		alert("Moused over");
	});
	
	_this.backg.addEventListener(AnEvent.MOUSE_DOWN, function()
	{
		alert("Moused down");
	});
}

 

Can you provide more details?

 

Regards,

JC

Likes

translate

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
community guidelines
Contributor ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

Thanks. (Also you don't owe me a speedy response but thank you!) I'll do some testing and report back. 

Likes

translate

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
community guidelines
Contributor ,
Mar 08, 2021 Mar 08, 2021

Copy link to clipboard

Copied

Tested this and 

 

_this.backg.addEventListener(AnEvent.MOUSE_DOWN, function()
{
alert("Moused down");
});

 

still does not work... any thoughts? You're sure it's working for you? The backg is a background panorama for which I've clicked 'create texture wrapping for all layers', could that be causing the problem? Can I not use actions on panorama background layers?

Likes

translate

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
community guidelines
Adobe Community Professional ,
Mar 09, 2021 Mar 09, 2021

Copy link to clipboard

Copied

Hi.

 

Sorry for the delay.

 

It seems that instances that belong to texture layers can't be referenced by their name.

 

Don't you get a reference error in the browser console when you try to add the event listener? Like this:

image.png

 

The workaround I can suggest to you is to add the events to instances that belong to regular layers.

 

I wish I could be of more help but the WebGL documents are still in beta and they don't have an official documentation yet.

 

Regards,

JC

Likes

translate

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
community guidelines