PDA

View Full Version : Simple compas tutorial


jaaaab
09-16-2007, 01:19 PM
Hi all

Here's finaly the tutorial i talked about a few weeks ago in intend to create a simple compas.

So sorry if some of you are waiting for a long time, but i remind no one here is paid to help others...

I had to work on it to fix some bugs and make it easy for everyone.

So here's what you need.

A simple compas will be composed of two objects: a map image and a field of view graphic that follows the panning.

In intend to improve your workflow, i strongly advise to use Denis pano Editor and to work without autorotator plugin (you will add it at last).

First download the fov .fla file attached to this post.

The source file is composed of two layers: sprite, which contains the graphic of your fov, and script, which contains the necessary AS3 code.

You don't need to modify script layer, but you can if you want to add some functionnality.

You only have to customize your fov graphic in sprite layer and then compile your fov.swf using flash CS3.

Now create a new pano with its xml parameters file.

Place your map .jpg on it as a static spot.

Create a new hotspot from fov.swf, name it "fov" and place it over your map using the editor (you can play with the depth param).

<spot id="fov" url="fov.swf" static="1" align="LB" salign="LT" staticX="96" staticY="207.00" depth="3" />

Be careful to adjust its alignment to its Left Bottom corner (align="LB"), the point it's rotating from.

Now place this xml line under your fov spot:

<spot id="deltarotation" rotation="0" />

Run your pano, it works! (hope so)

You can see the fov is not synchronised with your panorama direction.

Adjust deltarotation rotation value with editor to match the pano direction.

When you'll add a second pano to your tour, dont forget to change deltarotation to match the new pano direction, and replace your fov with something like this:


<spot id="nextPano" url="mySpot.png"

onClick=";
global.onTransitionEnd=setFov1();
loadPano(?panoName=myPano);
"

/>


after the <global> tag place your function:

setFov1 = "
fov.staticX=newValue;
fov.staticY=newValue;
deltarotation.rotation=newValue;
"


This code will fire when the new pano is fully loaded, and will refresh the fov.

Well now the only thing you have to do is some xml positionning with motion tween in intend to add some life to your map!

Waiting for some feedbacks to improve this tuto.

Cheers.

popunonkok
09-16-2007, 03:50 PM
Thanx!

I havent got the time right now but it feels good to know that this is up on the net now... =) Im looking forward to testin it...

Thanx again...

fotocubo
09-16-2007, 09:18 PM
Thanks so much jaaaab!

jomla
09-16-2007, 10:02 PM
Thanks a lot! Nice tutorial.

clustar
09-17-2007, 08:03 AM
Thanks you, jaaaab!!!

birdseye
09-17-2007, 11:31 AM
Thank you very much Jaaaab !

Ewart
09-18-2007, 05:45 AM
Cheers jaaab! Much appreciated.

jaaaab
09-26-2007, 09:49 AM
De nada guys,

i hope you will post here your maps examples ;)

++

martynrlee
09-28-2007, 12:23 PM
Hi Jaab / Forum Guys,

Firstly, thanks very much for posting this useful hotspot/compass info.

I have just purchased the software and am trying to create an interactive map overlayed over the top of the virtual tour environment. I have followed your tutorial and can make the compass rotate correctly, works great, thank you again. I can also link between two tours using the loadpano function.

My question is: Can you explain how to attach the code to compasses on different virtual tours? I cant seem to figure out how to stop tour 1's compass from rotating all the time. I want the first tour's compass to stop when I click on the second tour's compass, and then initiate the compass for the second tour.

I hope I have explained this as simply as possible. Please have a look at what I have got so far to see what Im trying to acheive:

www.revolutionviewing.co.uk/testing_folder/fpp/

All help most appreciated...

Martyn.

fbii
09-30-2007, 08:26 PM
Hi, Martyn,
I went here:
www.revolutionviewing.co.uk/testing_folder/fpp/
The scene loads, rotates, etc. but the left 1/5th side of the screen has what appears to be a 50% opacity brown area. Nothing else.
Is this where the compass is to reside?

fritz

jaaaab
10-01-2007, 07:11 AM
hi Martyn!

Well personnaly i can see only half of your map on the left side.

And your fov seems to be stopped, did you follow well the tutorial? Beware to compile fov.fla with flash CS3!

What do you call a tour? a single view or a group of views?

In case of a single view, i explained that you can use onTransitionEnd function (cf documentation) to set a different position for the fov while displaying a new pano.

If you go to a second tour, why don't you change the whole xml file? i think it's better to do that way, and separate xml code for each tour.

Cheers.

martynrlee
10-01-2007, 09:26 AM
thanks for your replies,

I have re-uploaded the files. I realised I had aligned the hotspots to the center of the page, thats why they werent showing properly on your screens (I have quite a wide monitor).

I have two hotspots, I think the one you (jaaab) could see was static, this is the second room (or tour or single view) that I want to be able to click to visit.

I think I understand how to change the fov position using onTransitionEnd function but I cant seem to figure out how to stop tour 1's compass from rotating all the time.

My goal is for the first tour's compass to stop when I click on the second tour's compass, and then initiate the compass for the second tour. Should I be using a separate xml file for each room/tour/single view? It feels like I should have each hotspot listed in the one xml file but a script to activate the 'current' hotspot for the current room/tour/singleview??

Again, thanks v much for your help with this, most appreciated.

jaaaab
10-01-2007, 09:49 AM
Ok, the problem is different Martyn!

You don't need to put two fov spots as in your xml.

You only need one, that you move on the map while you change the displaying pano, get it?

So just write a single fov spot in xml, and move it thanks to onTransitionEnd :)

++

martynrlee
10-01-2007, 11:26 AM
I am really confused, sorry Jaaab....!

I am trying to create this type of map navigation:

http://www.revolutionviewing.com/pridewood/cannonplace/1st-floor.html

I dont need the radars to work like in the example, just need the compass/hotspot points to rotate when I am viewing that room.

I understand that I can switch between the hotspots using a single xml, but I am really struggling with activating the next room's compass/hotspots rotation and deactivating the previous room?

jaaaab
10-01-2007, 06:36 PM
Martyn,

You don't need to activate/desactivate anything, there's just one radar in the whole map that you move when switching pano.

Sorry but i don't know how to describe this more simply!!

good luck:)

mickmick
11-12-2007, 05:32 PM
Thanx jaaaab for your tutorial.

It helps alot, you have done a great job and I hope for more tips/tricks and tutorials from you :)

Dewdan
03-14-2008, 11:16 AM
Hi and thanks jaaab for this great little tool.

I am really new with as3 so please be patient.
I am trying to ad your radar into a map.swf, but I can't seem to get it working.
I tried loading your fov.swf dynamically to a map.swf.
From Jason Vilmer's post. (http://flashpanoramas.com/forum/showthread.php?t=511&highlight=map.swf)
Tried to copy the AS to the map.swf.
I am running out of options.

I know it works as it is, but it would be great to take it a bit further.

Maybe someone has some good idea how to implement this.
Basically I have a map.swf with 4 buttons that when clicked makes pano load next image and repositions the loaded fov.swf. but i don't seem to be able to make it turn with the pano.

Any Idea? Help? Sugestion?
Thanks

jaaaab
03-19-2008, 10:05 PM
Hi Dewdan,

fov.swf is meant to be integrated directly into the xml as a spot, not into another swf.

to use fov.fla code with yours, try importing your flash stuff into fov.fla, not the contrary.

cheers.

cheathamlane
03-19-2008, 11:04 PM
Maybe someone has some good idea how to implement this.
Basically I have a map.swf with 4 buttons that when clicked makes pano load next image and repositions the loaded fov.swf. but i don't seem to be able to make it turn with the pano.


How is your map.swf communicating with pano.swf (or a container holding the panoramas)? Can you post an example?

massimo
03-23-2008, 03:10 PM
ciao
very clear explanation, thanks.
I use it as "reset" also...
http://www.lenzo.it/test5/