Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #11  
Old 11-16-2007, 01:43 AM
Scott Witte's Avatar
Scott Witte Scott Witte is offline
Senior Member
 
Join Date: Sep 2007
Location: Milwaukee, WI USA
Posts: 593
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Ricardo View Post
var_x = current pano pan
var_y = current hotspot pan
var_z = |var_x-var_y| in other words, module(var_x-var_y). var_Z will be positive, ever.
Ricardo,

"...ever"... meaning always?

You may understand this far better than me but just in case.... if var_x = -120 and var_y = 20 then var_x-var_y = -120 -20 = -140 which obviously is not positive. Did I misunderstand? Would this make a difference in your method?
__________________
Scott
Tour de Force 360VR
Scott Witte Photography
----------------------
Auto Quality Plugin: Guarantee the best FPP experience possible for every viewer on every computer.
Motion Zoom Transition Plugin: Move from Node to Node
Reply With Quote
  #12  
Old 11-16-2007, 01:51 AM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: California, USA
Posts: 773
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Denis View Post
OK. Sounds good. But "shortestPath" and "longWayAround" can't describe all possibilities, what if I need to make one turnover around sphere (or even two). Now I can set pan+=360 (pan+=720).
Of course, Denis you're right.

But, making long spins around like that is not the norm (that is, what most people would want to do). We're just talking about setting the defaults. Then, we can script away to make those really long 720 or 1080 pano spins (say, by a nifty set of functions which we can already write).

[edit: Of course, I haven't tried yet in the latest update -- as of 11/15/2007]
__________________
Patrick
http://patrickcheatham.com

Last edited by cheathamlane; 11-16-2007 at 02:06 AM.
Reply With Quote
  #13  
Old 11-16-2007, 02:32 AM
Ricardo's Avatar
Ricardo Ricardo is offline
Junior Member
 
Join Date: Aug 2007
Location: Rio de Janeiro
Posts: 11
Downloads: 0
Uploads: 0
Send a message via MSN to Ricardo Send a message via Skype™ to Ricardo
Default

Quote:
Originally Posted by Scott Witte View Post
Ricardo,

"...ever"... meaning always?

You may understand this far better than me but just in case.... if var_x = -120 and var_y = 20 then var_x-var_y = -120 -20 = -140 which obviously is not positive. Did I misunderstand? Would this make a difference in your method?
Hi Scott,

Yes, means allways.
In English the correct name for "module" (fun??o m?dulo, em portugu?s) is absolute value function.
The math function "absolute value" takes the absolute value of a number or a numeric expression.
For example, the absolute value of -120-20 = 140 and not -140.
In AS 3, this function is called abs () method

Language version: ActionScript 3.0
Player version: Flash Player 9

public static function abs(val:Number):Number
Computes and returns an absolute value for the number specified by the parameter val.
__________________
Ricardo Ara?jo - TVB

Last edited by Ricardo; 11-16-2007 at 02:36 AM.
Reply With Quote
  #14  
Old 11-16-2007, 02:40 AM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: California, USA
Posts: 773
Downloads: 0
Uploads: 0
Default



Hey Ricardo!

Ah, I didn't understand your notation... Now I get it.

So, have you written this, or were you hoping Denis could work it in?

I was going to say, you're almost there with the function.
__________________
Patrick
http://patrickcheatham.com
Reply With Quote
  #15  
Old 11-16-2007, 02:46 AM
Ricardo's Avatar
Ricardo Ricardo is offline
Junior Member
 
Join Date: Aug 2007
Location: Rio de Janeiro
Posts: 11
Downloads: 0
Uploads: 0
Send a message via MSN to Ricardo Send a message via Skype™ to Ricardo
Default

Hi Patrick,

Another moto crash, anoter 6 bronken bones and some extra time to write code before I can return to field jobs... so, I'll try to write this code.
__________________
Ricardo Ara?jo - TVB
Reply With Quote
  #16  
Old 11-18-2007, 08:50 AM
Virtualguide's Avatar
Virtualguide Virtualguide is offline
Senior Member
 
Join Date: Sep 2007
Posts: 224
Downloads: 2
Uploads: 0
Default

Hey Scott,

I looked at Your example and thought how to solve the problem (the "feature" really does not look very nice )
And I?ve got some idea, but had not time to experiment yet, try Yourself first:
use limits.swf plugin and change the parameters dynamically by particular hotspots.
I thing that should do the job.
Regads, Igor
Reply With Quote
  #17  
Old 11-18-2007, 04:27 PM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: California, USA
Posts: 773
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Ricardo View Post
Hi Patrick,

Another moto crash, anoter 6 bronken bones and some extra time to write code before I can return to field jobs... so, I'll try to write this code.
RICARDO!

Well, it sounds like you wear a helmet at least.

Hopefully your writing/typing hand is OK.

Heal well...
__________________
Patrick
http://patrickcheatham.com
Reply With Quote
  #18  
Old 11-21-2007, 03:22 AM
viking0 viking0 is offline
Junior Member
 
Join Date: Oct 2007
Posts: 24
Downloads: 0
Uploads: 0
Smile

hello people
I tryied this code for my panorama (embedpano & AS3) and it work s

maybe you can use it
Code:
function executehotspots (event:MouseEvent) {	
	if (event.target.attributes.getParam("id")=="to1to2") {
	if (panorama.pano.pan>=0){
	panorama.externals.hotspots.execute("pano.pan_v=0; pano.tilt_v=0;pano.pan=180,400,smooth;pano.tilt=0,400,smooth;pano.zoom=0.755,400,smooth;");
	}
	if (panorama.pano.pan<0){
	panorama.externals.hotspots.execute("pano.pan_v=0; pano.tilt_v=0;pano.pan=-180,400,smooth;pano.tilt=0,400,smooth;pano.zoom=0.755,400,smooth;");
	}
	this.play()
	}
}

panorama.externals.hotspots.addEventListener(MouseEvent.MOUSE_DOWN, executehotspots );
so the key here is "if (panorama.pano.pan>=0)" or "if (panorama.pano.pan<0)"

i hope it helps
Reply With Quote
  #19  
Old 03-03-2008, 12:24 AM
phberlin's Avatar
phberlin phberlin is offline
Senior Member
 
Join Date: Aug 2007
Location: Berlin, Germany
Posts: 300
Downloads: 1
Uploads: 0
Default

Hi viking,

I am also having this whirling-hotspots-problem. Unfortunately, I don't have the tools to compile Action Script... Is it possible for you to put that specific SWF online somewhere for those (like me) who can't compile it for themselves? I would be so grateful for this!

Can it be used as a plugin, or how does one make it affect the panorama's movement restrictions (e.g. the pano doesn't turn in the "wrong" direction anymore)?

Best regards, Phberlin
Reply With Quote
  #20  
Old 03-03-2008, 10:57 PM
cheathamlane cheathamlane is offline
Senior Member
 
Join Date: Mar 2007
Location: California, USA
Posts: 773
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Ricardo View Post
var_x = current pano pan
var_y = current hotspot pan
var_z = |var_x-var_y| in other words, module(var_x-var_y). var_Z will be positive, ever.

if (var_z<180)
{
you can go to var_y, it is the shortest way to the hotspot;
}
else
{
if (var_y>0)
{
set the new hotspot pan value to -1*(360-var_y);
}
else
{
set the new hotspot pan value to (360-var_y);
}
}
Hey Ricardo:

This doesn't really help the issue of being able to use conditionals from within FPP's XML... but your above thinking does work from within a Plugin for FPP. Example usage:

Code:
	var var_x = hotspots.pano.pan; // current pan value
	var var_y = myPanTogoto; //pan value we want to swing to
	var var_z = Math.abs((var_x-var_y)); //absolute value
	var shortestPan;

	if (var_z<180) {
		shortestPan = myPanTogoto;
	} else {
		if (var_y>0) {
			shortestPan =  -1*(360-var_y);
		} else {
			shortestPan =  (360-var_y);
		}
	}
	//
	var thePathToTake = "pano.pan="+shortestPan+",5000,,,";
        hotspots.execute(thePathToTake);
Cheers,
__________________
Patrick
http://patrickcheatham.com
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 04:07 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.