[buttons problem] API work after click panorama. :/

Specific Q&A about the new Flash export
Posts: 5
Joined: Mon Jul 23, 2007 7:27 pm

Mon Jul 23, 2007 7:50 pm


I have very sirous problem with my API.
When I load a swf with pano to container everything work perfect, but when i trie to load next panorama first what i must to do is click on pano wich I loaded previously next press any button on map. And so on...

This is part of code responsible for loading swf in this flash:

Code: Select all

on (release) {
	// Create container movieclip
var vr:MovieClip = _root.createEmptyMovieClip("vr", 2);
// prevent access to "real" root

// Create a Movieclip loader
var myLoader = new MovieClipLoader();
var myListener = new Object();

myListener.onLoadStart = function() {
// Set the dimentions and position of the pano
// change initial viewing parameters
  vr.autorotate = 1;
  vr.autorotate_delay = 20; 

// add the Listener

// ... and finally load the pano!
myLoader.loadClip("teren/1.swf", vr); 


It is similar problem that i found here http://www.pano2qtvr.com/forum/viewtopi ... ns+problem

Here is my presentation http://budstol-holding.pl/panel_pop3.swf

Ps.If you have any questions about other parts of code please ask. :)
Ps2.Sory for my english,
User avatar
Chief Gnome
Posts: 2554
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria

Tue Jul 24, 2007 3:40 am

I guess I figured this out now. This is a focus issue. The panorama takes the focus to capture key strokes. After loading (in the onLoadInit()) just give the focus to another element for example the entire root. To do this call:

Code: Select all

I haven't tried this out, because I can not reproduce this effect on my Falsh Development machine but I hope this works/helps.
MfG, Thomas
Posts: 5
Joined: Mon Jul 23, 2007 7:27 pm

Tue Jul 24, 2007 8:05 pm

In fact this is quite briliant idea, but even i set it on end load script, like this

Code: Select all

It dosen't work.
Second aproach

Code: Select all

this.panel.onLoadInit () = function () { 
Selection.setFocus(_root); }
And third

Code: Select all

	myListner.onLoadInit = function(panel:MovieClip){
Maby i just don't know how and where place this "function" properly.
Martin Garcia
Posts: 14
Joined: Mon Jul 09, 2007 11:38 pm

Thu Jul 26, 2007 8:52 pm

hi man i think both have the same problem. i make something i change the vr._lockroot = false; and woks fine, but the problem in my case is the position of the vr...

goood luck
User avatar
Posts: 36
Joined: Thu Mar 08, 2007 7:19 pm
Location: Glasgow, Scotland

Mon Aug 20, 2007 10:49 pm

I had both the positioning problem AND the problem Thomas describes as "focus". Actually, when I told him about my site and these issues, he released v1.6.5 which dealt with the positioning issue, and then v1.6.6 which dealt with the "focus" problem. v 1.6.6 also sured a problem for me where the controllewr I created the Flash panos with didn't appear.

I think I knowe what Thomas means by focus, but in the end I had to make NO code changes, his two successive versions dealt wioth issues that arose somewhere in a previous 1.6 version but weren't there in 1.5.

I think all these issues were related to one area of how Thomas's GUI creates the vr. Try v1.6.6 if you haven't already!