PDA

View Full Version : Changing the default "transition" effect?


apinstein
12-01-2007, 04:01 AM
Hi-

First of all let me say that flashpanorama is a really great piece of software. I run a virtual tour hosting company and we have been using PTViewer 2.8 for about a year but have continued problems with memory and have been looking for a flash player to upgrade to. I just bought it today and already I have it working almost perfectly to my liking. Your software, documentation, and support forums are great. I found perfect answers to 2 issues almost immediately searching the forums. I wish I had found you months ago!

In any case, I have one thing I cannot figure out.

When transitioning from one pano to another with loadPano(), there is a cross-fade effect that takes up to 3s to render at full screen. This is not really practical. I cannot find a way to make the tween go faster. I have tried to follow some of the hotspot instructions but they are quite confusing. I also installed the debug but the log doesn't show any functions running, so I am not sure where the default transition exists...

How would you recommend I fix this?

TheKamakaZi
12-01-2007, 07:52 AM
Hi apinstein

Welcome to the club :) Hope you have as much success with as i have...

To answer your question, it's actually very simple. In the loadPano() event, you can specify additional parameters as follows:

loadPano(PanoName, TransitionTime (in milliseconds), TransitionEffect);

Hope that helps!

apinstein
12-01-2007, 12:18 PM
Ah ok great that worked! But where is a list of transitions I can use?

zleifr
12-02-2007, 04:47 AM
In the hotspots tutorial:

(none, fade, stripes, coverDown and visible)

Or you can make your own:

onTransitionStart event, fires when the next panorama is loaded and transition effect starts

This example demonstrates how to make your own transition effect (the first panorama goes to blur, then the second one appears from the blur effect):

<global onTransitionStart="pano2.blur=128;pano.blur=128,500" onTransitionEnd="pano2.blur=0,500">
<spot url="next.png" onClick="loadPano(panorama2.swf,1000,none);" />
</global>

onTransitionEnd event, fires when transition effect is over

This example demonstrates another transition effect (the first panorama goes to white, and then the second one appears from the light):

<global onTransitionStart="pano2.brightness=1;pano.brightness=1,800" onTransitionEnd="pano2.brightness=0,1000">
<spot url="next.png" onClick="loadPano(panorama2.swf,1000,none);" />
</global>

birdseye
12-03-2007, 09:25 AM
Hi Zleifr,

Thank you for sharing this piece of code. Can this also be used for multiple panorama's in one XML file?

Tia.
Yvan

Edit: Sorry, already found it... this is the code for multiple pano's... stupid me!

hamburger77
05-08-2008, 10:05 AM
Hi,

but how can i change the first transition? I want the first panorama after loading to fade in. Is it possible?

Thank you.
Marvin

HansNyberg
05-08-2008, 01:49 PM
Hi,

but how can i change the first transition? I want the first panorama after loading to fade in. Is it possible?

Thank you.
Marvin

I guess there is a clever method but mine is very simple.
Make a fake pano with 6 black cubefaces as the initial pano. Then just use onload to load the first real pano.

And regarding transition time. Do not set times like 2000 or even 500.
They may work as real time transition on a new fast computer but if you just go back to a 3-4 old 1.6 or 2.0 mHz the real time may be tripled.
The transitions are very processor hungry.
I use max 300 ms.

Hans

zleifr
05-08-2008, 03:28 PM
In addition to Hans' clever method, I believe you can make the initial pano fade in from black with filters using this code:

...
<global onStart="pano.brightness=-1;pano.brightness=0,300;" .... >
....

So all that does is, onstart, it sets the pano to brightness of -1 (black) and then immediately tweens it up over 300 ms to a brightness of 0 (normal).

Zephyr

carel
06-23-2008, 12:02 AM
Zephyr,

When I try your method for fade from black of the first pano:
<global onStart="pano.brightness=-1;pano.brightness=0,300;" .... >
, the pano is still visible while it is loading. Once loaded it goes to black and then it fades in. How do I prevent seeing the pano while it is loading?

Carel