Masking hotspots in Flash

Specific Q&A about the new Flash export
neve
Posts: 8
Joined: Mon Apr 30, 2007 7:40 am

Masking hotspots in Flash

Post by neve » Tue Sep 25, 2007 3:32 am

Hi,

I've searched the forum but I can't figure out how to mask the hotspots in Flash. I use setMask() to mask the panorama and that works, but the hotspots float over everything. I attempted to mask hs_textmc1... doesn't work.

In my previous virtual tours I used the physical border mask in the container sample, but I am really hoping to use a programmatic mask as it's a lot neater and easier to work with, plus I have ditched the border and put things in the root for this one.

Has anyone masked the hostpots programmatically? Are they meant to get masked with the VR?

thanks,
Neve
******
Neve

User avatar
thomas
Chief Gnome
Posts: 2537
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Post by thomas » Wed Sep 26, 2007 3:56 am

Do you mean the text hotspot or did you add your own hotspots with the "addHotspot" API call?
MfG, Thomas

neve
Posts: 8
Joined: Mon Apr 30, 2007 7:40 am

Post by neve » Wed Sep 26, 2007 4:17 am

The add Hotspot API call, added using the function addNextPanoHotspot container code sample in Flash.
thanks
******
Neve

User avatar
thomas
Chief Gnome
Posts: 2537
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Post by thomas » Wed Sep 26, 2007 1:50 pm

If so, then the movieclip is under your control and you can mask/clip it as you like and you can set the depth value! As you can see in the code the movieclip is created within the container and owned by the container. The panorama just changes the _x and _y values.
MfG, Thomas

neve
Posts: 8
Joined: Mon Apr 30, 2007 7:40 am

Post by neve » Thu Sep 27, 2007 12:52 am

Hi Thomas,

which container? I mask the pano with vr.setMask(maskmc); but it doesn't mask the hotspots, which appear on different depths, eg 7, 11, 14 when I trace it out. They are all over the top of the pano and go outside it.

I just haven't figure out what to mask in the code to mask out the hotspots, I thought it would be hs_textmc1. So I've gone back to the method of putting a physical mask on the stage and putting the map etc in movie clips at a higher depth. I was just hoping not to have to do that because it makes layout changes more fiddly.

BTW love the software, this is the 3rd tour I'm working on, our minister launched the last two and they were a big hit, especially the Carillon which is at http://www.nationalcapital.gov.au/visit ... illontour/ if you're interested. The other one is Blundells Cottage also on that web site.
******
Neve

User avatar
thomas
Chief Gnome
Posts: 2537
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Post by thomas » Thu Sep 27, 2007 2:53 am

Ok, these are QuickTime style hotspots. The label is displayed as a textfield called vr.pano.hotspot_txt . You should be able to mask it.
MfG, Thomas

athesia
Posts: 4
Joined: Tue Oct 23, 2007 12:19 pm

Post by athesia » Thu Oct 25, 2007 5:59 pm

Hi Thomas,

i was so close to have an answer to my question in this thread!
I would like to know the Actionscript path to the hotspots created with pano2qtvr 1.6.3 (polygon hotspot for example). I tried to decompile the .swf created where i discovered the extraordniary complexity of the code! I found my hotspot in the function addQtHotspot
pano.addQtHotspot(1, "Title", "Url", "_self", 0, 0);
function addQtHotspot(aid, title, url, target)
{
var __reg2 = new Hotspot();
__reg2.id = "" + aid;
__reg2.url = url;
__reg2.title = title;
__reg2.target = target;
if (this.hs_local == 1)
{
__reg2.ofs.x = 0;
__reg2.ofs.y = 0;
}
else
{
__reg2.ofs.x = this.bclip._x;
__reg2.ofs.y = this.bclip._y;
}


this.qthotspots[aid] = __reg2;
}

but i can't go much further.

I am talking about the "zone" hotspots where the label is following the HandCursor. I would like to do a removeMovieClip(); on one of them from the container.swf... I've tried vr.pano.qthotspots[1] but it's wrong....

Your help will be very appreciated !!

User avatar
thomas
Chief Gnome
Posts: 2537
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Post by thomas » Fri Oct 26, 2007 7:38 pm

The location of the hotspots are stored in an image.
As you may know decompiling violates my copyright on the code so I will not help you any longer if continue to post my copyrighted source code of my panorama player.
MfG, Thomas

athesia
Posts: 4
Joined: Tue Oct 23, 2007 12:19 pm

Post by athesia » Fri Oct 26, 2007 7:52 pm

Oups, sorry for that! I didn't mean it. I was just trying to solve this, but i (or you) can delete it from the forum, no offense.

The hotspots are stored in one or 6 images, if my Panorama is from 6 faces source?

Is there a way to change the characteristics of theses links? i would like to set a "loadMovie();" link instead of a "getURL();"


Edouard

(Sorry again for the code, i was too curious)

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

Defining Flash Hotspots in Panoqtvr

Post by Brian » Sun Oct 28, 2007 2:15 pm

Thomas,

I'm also struggling to define Flash hotspots in the Pano2QTVR Hotspots Tab given that there's only url and .mov options. I use your demo code (with my own xml file for panos and hotspots instead) but I'd prefer to do it graphically. I believe I have seen a workaround referred to where you start to define a .mov hotspot and then change it to one recognised by Flash...is this so? Either way, can you tell us the procedure since you have said previously that Pano2qtvr will cope with exporting Flash Hotspots with the pano in recent versions.

I empathise a bit with your correspondent who tried decompilation, totally innocently I would guess. The real "missing manual" here is a complete definition of the Pano2QTVR API which would help everyone be able to link PanoQTVR's output to their own Actionscript, with appropriate variable names. Many other have mentioned this and I'm sure you would get less trivial requests for help if this were available other than in occasional pieces of specific advice to queries.

It's rather like Richard Feynman's (the Nobel physicist's) assertion that adducing the laws of physics is like trying to guess the rules of chess while seeing only a partial move from a game every now and then. If a move you happen to see this year is a pawn queening then it might take a long time to work out the more prosaic rules! Similarly it's hard to do the best with ActionScript in one's Flash pages if we're not sure how to reference the variables potentially able to be passed by Pano2QTVR.

Having said all that, great product and I'm a committed user of it in preference to anything else. Even the best and expensive Turkish carpets always have one (deliberate) flaw!!

best wishes,

Brian

User avatar
thomas
Chief Gnome
Posts: 2537
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Post by thomas » Thu Nov 01, 2007 5:21 pm

I understand your criticism about a proper documentation an I try to improve it now with a special Wiki page: http://gardengnomesoftware.com/wiki/Pano2VR_-_Flash_API
I will try to improve this page over the time to make it a better resource.

Regarding Flash Hotspots: For the moment you need to use html files + iframes. This has been discussed in http://gardengnomesoftware.com/forum/vi ... .php?t=566
MfG, Thomas

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

Converting iPIX strips to equis with pano2VR

Post by Brian » Thu Nov 01, 2007 6:10 pm

THomas,

Thank you, I'll take a look and I'm sorry if I have missed something previously published.

By the way, I have bought an upgrade copy of Pano2VR and at last I'm able to transform my old iPIX (yes, I have taken some mouthwash) cube strips to cubes, and then rotated and renumbered the cubes where necessary to then recompile into an equirectangular.

You might ask why I'd want to do this. Well, for some of my old iPIX (mouthwash again) work I never created equis, I just went straight to the ipx files. For many, though, I generated cube strips to be able to edit rectilinear images. Why didn't I make equis? God knows, but I didn't always!

So the new capability in Pano2VR is helpful in that situation. If anyone wants to know the cube translation, it's as follows:

iPIX strip is in the order FRONT (upright), Right (base to left) Top (upside down) LEFT (base to right) Bottom (upright) and Back (upright).
So using Pano2VR, use that as input and make cubes the output, and you get CUBES IN THE SAME ORDER AND ORIENTATION.

Then, rotate and rename (only where necessary) the cubes as follows:

front (0) as is
right - rotate 90 left and save as (1)
back - no rotation but rename from (5) to (2)
left - rotate 90 right but name the same
top - rotate 180 and rename from (2) to (4)
bottom - no rotation but rename from (4) to (5)

Then, use these cubes as input to pano2VR and output an equi!

If this is all a waste of time, sorry...but thanks from me for the new capability!!

best regards,

Brian

User avatar
thomas
Chief Gnome
Posts: 2537
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Post by thomas » Thu Nov 01, 2007 11:17 pm

Is this a iP*x standard way to arrange the cube faces? If so, can you send me one of those beast and I can add the format directly because this may be useful also for other people and it should not be much work.
MfG, Thomas

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

Converting iPIX strips to equis with pano2VR

Post by Brian » Thu Nov 08, 2007 3:58 pm

Thomas,

I sent the iP*X cube strip file you need last week, I hope you got it.

A small point about your Flash Park Demo - I'm wondering ifyou need to recompile it in version 1.6.6, because the existing version fails to display a controller when embedded in a bigger page. If you created the demo with no controller then the rest of this message can be ignored - except that if it IS a version 5 creation, there WOULD be a problem if you had intended a controller to appear. It goes like this:-

Wiith the 1.6.6 version, as I mentioned to you before, not only are all the positioning and "focus" problems referred to variously by me and others fixed, but the controller is correctly positioned too (in my case, bottom left as chosen in pano2QTVR). With the old (version 5?) compilation, the controller is there, I think, but not within the masked viewing area necessary when embedding the pano in a larger page. I have just corrected all my tours with v1.6.6 to put this right. It's actually very easy - you can use the same pqp and pqt templates as with previous versions, but open with v1.6.6.

If you look at my site http://www.briansutton.net you'll see that if you open any of the tours FIRST other than EuroPark (that's what I called your PARK Container demo), and then select the other tours in turn, you get the controller each time - even in the EUROPARK tour. But if you refresh the page (you must do this first), and then open EUROPARK as the FIRST tour to be opened, you get no controller - not even on the other tours. This is because the first pano on all the other Tours is compiled with v1.6.6, but your demo PARK tour is I guess version 5. Here I am assuming that compiled it with a controller...

somehow the first pano to be opened sets the controller position (and in fact the pano position) for all the other tours and panos. This is fine with v 1.6.6, but not with v5.

I know we are now looking forward to using pano2VR more, and I haven't really explored that yet (apart from finding the cube handling so useful, as mentioned). But I hope this v1.6.6 point is valuable for anyone possibly finding embedding issues with earlier versions.

Best regards,

Brian

smooth
Posts: 1493
Joined: Sat Sep 09, 2006 7:30 pm

Post by smooth » Thu Nov 08, 2007 6:16 pm

You have uploaded the controller into the same directory right?
The controller is called from outside, it was never embedded.

Regards, Smooth 8)
Image

Locked

Who is online

Users browsing this forum: No registered users and 3 guests