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

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

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

Post by danio987 » Mon Jul 23, 2007 7:50 pm

Hi.

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
vr._lockroot=true;

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

myListener.onLoadStart = function() {
// Set the dimentions and position of the pano
  vr.window_width=600;
  vr.window_height=300;
  vr.window_x=200;
  vr.window_y=6;
// change initial viewing parameters
  vr.pan=300;
  vr.tilt=10;
  vr.autorotate = 1;
  vr.autorotate_delay = 20; 
};


// add the Listener
myLoader.addListener(myListener);

// ... 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
thomas
Chief Gnome
Posts: 2532
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Post by thomas » 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

Selection.setFocus(_root); 
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

danio987
Posts: 5
Joined: Mon Jul 23, 2007 7:27 pm

Post by danio987 » 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

Selection.setFocus(_root);
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){
		Selection.setFocus(_root.panel);}
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

Post by Martin Garcia » 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
Brian
Posts: 36
Joined: Thu Mar 08, 2007 7:19 pm
Location: Glasgow, Scotland
Contact:

Post by Brian » 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!

Locked

Who is online

Users browsing this forum: No registered users and 10 guests