• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

VR 360 Panorama event handlers not working

Engaged ,
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

339

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
Engaged ,
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...

Votes

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
Community Expert ,
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

Votes

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
Engaged ,
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. 

Votes

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
Engaged ,
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?

Votes

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
Community Expert ,
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

Votes

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
Explorer ,
Dec 14, 2023 Dec 14, 2023

Copy link to clipboard

Copied

LATEST

Looking at the same tutorial; I've a 360 panorama on frame 1 of main timeline, button object on same (2 frames). I want to go to frame 2 main timeline on click (another panorama) - because apparently scenes do not work in VR 360 except for under one circumstance, which is where you have tested the scene and in the process created an html page for that scene (which is a trap to avoid, because then you're actually linking to another page, not a scene, and has associated loading time). I now have this on frame 1: 

 

this.stop();

// add mouse handles for the directional 'direction_sign_1' movie clip
this.direction_sign_1.addEventListener(AnEvent.MOUSE_OVER, function() {
this.play();
});
this.direction_sign_1.addEventListener(AnEvent.MOUSE_OUT, function() {
this.gotoAndStop(1);
});

this.direction_sign_1.addEventListener(AnEvent.CLICK, function() {
anWebgl.root.gotoAndPlay(2);
});

 

This works when tested and also works locally in Firefox with local content enabled. I'm now struggling to make it work on an AWS S3 bucket for online testing - any suggestions on that very much appreciated.

Votes

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