skybox6 and interactive moviematerial: mouseevents not fired

Software: Away3D 3.x

Beppin, Newbie
Posted: 26 September 2011 06:20 AM   Total Posts: 4

Hi, I’m making a virtual panorama and I need to have animated hostspots.
I load an swf movie containing the backgroundImage for skymap6 and movieclips used for hotspots already positioned ove the right places.

Then I look for those hotspot movieclips, I stop them at frame 1 and I set them mouseChildren=false;

Then I add MouseEvent listeners to the loaded movieclip, create a Skybox6 and a MovieMaterial interactive=true.

MouseEvents are not fired. If I use a Sphere instead of a Skybox6 I see the the Sphere with movieclip wrapped on it and all works fine.

I’m using away3d-core-fp10-466d6f2

My conclusion should be that Skybox6 doesn’t allow interactivity, but as I think I’m not the first one who tried to make a vr panorama with animated hostspots using a Skybox6, maybe there is something I did not pay attention to.

I need to use Skybox6 because it is easy for people who draws the hostspot to have all the envirorment background in a single image, as hotspots are not completely contained in just 1 face at time of the cube. Wrapping image inside a sphere would mean to draw “distorted” hotspot.

Does anybody know how I can get my result?

   

Beppin, Newbie
Posted: 27 September 2011 05:25 AM   Total Posts: 4   [ # 1 ]

Tried with a cube, ok, mouse on MovieMaterial works, but whebn I move mouse to cube it slightly moves, and there are white lines in edges positions…

Then opened Skybox6 code, found mousenabled property = false, turned to true and now I have the same problem I have with cube… mouse works but I see those ugly lines.

What am I doing wrong?

   

Beppin, Newbie
Posted: 27 September 2011 05:59 AM   Total Posts: 4   [ # 2 ]

Depends on mouse position, looks it has something to do with floating point mouse coordinates vs Bitmap int coordinates.

   

Beppin, Newbie
Posted: 27 September 2011 07:46 AM   Total Posts: 4   [ # 3 ]

Ok.. I ended with a new class InteractiveSkybox6 with intersctive=true.
About trembling texture on mousemove I created a class StableMovieMaterial applying :

movie.x = int(movie.x);
movie.y = int(movie.y);

at the end of onMouseMove method.

It’s a barbarian hack, but it works and for my purposes is enough.

If someone more expert than me finds a more civilized solution is welcome.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X