Skip to main content
warpigs666
Inspiring
March 3, 2021
Question

VR 360 Panorama event handlers not working

  • March 3, 2021
  • 3 replies
  • 481 views

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.v0t528

 

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?

This topic has been closed for replies.

3 replies

Inspiring
December 14, 2023

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.

JoãoCésar17023019
Community Expert
Community Expert
March 3, 2021

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

warpigs666
Inspiring
March 4, 2021

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

warpigs666
Inspiring
March 3, 2021

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