Getting currently displayed panorama's url

Q&A about the latest versions
Post Reply
macdigger
Posts: 4
Joined: Tue Jul 21, 2009 12:06 am

Thu Oct 29, 2009 6:47 am

I have hotspot-linked panoramas for a panoramic tour, which are loaded into parent movie clip.
This parent movie clip also has navigation controls (I had to move them outside of panorama, due to design requirements).

What I am trying to do is to get the currently displayed panorama and the "selected" state of the navigation menu to be in sync. For that, I have setup a timer, which would peek inside the panorama clip and check which panorama is currently loaded, and update navigation's "selected" state accordingly.

However, I have found no way to detect which panorama file is currently loaded. Say, I initially load 1.swf panorama, which load 2.swf panorama file via hotspot. How do I detect the change in displayed content?
macdigger
Posts: 4
Joined: Tue Jul 21, 2009 12:06 am

Thu Oct 29, 2009 12:58 pm

Well I sort of found a solution, approaching the problem from another side.
I have attached a listener to panorama, which listens to hotspots being clicked on:

Code: Select all

vr.pano.onClickHotspot=function(id:String) {
    trace("clicked on hotspot id:", id);
}
This way, I can track a supposedly being shown pano (considering clicking on a hotspot always opens the linked pano), and highlight my external navigation elements.

Still, would be nice to know/have some getters for url of currently displayed panorama...
Post Reply