Part VII – Panorama hotspot interaction, light up on mouse over

With respect to the previous post (part VI), only a few minor changes were required to the demo we had so far. Basically making the hotspot light up is implemented by drawing on the plane’s material. That’s all there is to it. I’ve implemented this idea in the interactive material class.

Lots of room for optimization, but the basic principle remains the same.

Although the goal has never been to deliver a set of reusable classes/components, the basics are all there, and the possibilities are legion. And although the architecture of the code samples can be improved, and they are far from being a complete application, most of the principles and a lot of the sources can be reused and applied to your own panorama implementations. Also note that you might need to clean the code a bit (I saw some left over parameters sneaking around that are no longer used, hunt them down!).

Download the sources here: 3d Panorama v0.7 (1002 downloads)

So this concludes my panorama series, hope you enjoyed it. Onto the next project!

Below is a screenshot of the final version with real images and hotspots implemented. The image is a 3d image and was rendered by my colleague at TriMM, Sebastiaan Dorgelo.


Print Friendly, PDF & Email
4 replies
  1. Skybutter
    Skybutter says:

    Hi, Thanks for your tutorial sir, It’s very helpful I’m doing some panorama project which will link in-between a room to another..And I’m not good in scripting. 🙁

    How can I place the hotspot button manually in the script and how to make it link to another swf file?

    Thanks for your help!
    (English isn’t my native language and I bring my apologise.)


    • Hans Wichman
      Hans Wichman says:

      Hi Sky,

      no need to sir me, just another developer just like you:).
      Are you doing as2 or as3? This is all old as2 stuff, and you would be better off building it in as3.
      Unfortunately, this is hard enough if you DO know scripting. If you are not a good scripter, I’d advice you to start doing basic tutorials for mouse clicking, image loading, bitmap manipulation, until you understand the sample code. At that point, you can make your own hotspots.
      Anyway, I’ll tell you the basic process. In this sample random cube hotspots are generated and then painted into both the texture and a backing bitmap whose pixeldata at the location of the hotspot in the texture, maps to an id of that specific hotspot. So you will have to create a drawing routine which draws arbitrary hotspots into the texture and backing bitmap.
      Then again, you might be better off using something like Pano2VR. If you can avoid it, don’t reinvent the wheel, unless your hand is forced by a geeky nature like it was in my case:).


  2. jorge
    jorge says:

    estoy tratando de cargar los ficheros para actionscript 2 en flash, pero no lo consigo. En los ficheros que hay para descargar, no están los ficheros en formato FLA, solo están en formato AS y no consigo cargar satisfactoriamente los proyectos.
    ¿Podrías enviarme los proyectos, desde el 1 hasta el 7, con los ficheros FLA, por favor?

    I’m trying to load the files for actionscript 2 in flash, but I can not get it. In the files that are available for download, there are no files in FLA format, they are only in AS format and I can not successfully upload the projects.
    Could you send me the projects, from 1 to 7, with the FLA files, please?

    mi correo es:

    • Hans Wichman
      Hans Wichman says:

      Hi, there are no fla files, these were all done in FlashDevelop, a more code oriented IDE than the default Flash IDE.
      You need to download FlashDevelop from here:
      and then open the .as2proj files and run them from the IDE.
      That said, note that these samples are mostly here for posterity, but depending on what you need to built there are definitely better ways nowadays then turning to AS2.

      Hope that helps!


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *