Placing a different pop-up info window for each flash

Special forum to share and discuss skins for Pano2VR and Object2VR
Miky
Posts: 14
Joined: Tue Jul 19, 2011 1:06 pm

Hello,

I want to place a different pop-up info window for each flash using the same button and the same skin.
For example: If I walk inside a kitchen I want that when I press the "i" button I will see a pop-up that gives description on the kitchen, then when I leave the kitchen and enter the living room (different flash) I will press again on the "i" button and will get another information.
I want to do it on the same html same button and same skin.

I know it can be done because I saw it here:
http://www.hopkimedia.co.uk/Mora%20Floo ... rance.html

Thank you!
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi
With version 3.0, you can use the Add External Image or SWF tool.
1) Make your images the same size to make life easier for yourself but not essential.
2) In the User Data of every p2VR file put the image file name in the Information text field, e.g. park.png which is 200 x 200px.
3) Place an external image loader in the skin and set it for 200 x200px and anchor centre.
4) in a Hotspot Template add: Loaded => Set Text => Text: $ui => Target: the image loader

As each panorama loads the image in the user data Information text field will be displayed. you can change the image in each p2VR file so reproducing what I did in the house tour.

There are also a couple of cool things you can do with this.

Using Pano2VR:
Make another Flash Output, 200 x 200px with autorotate on, set scaling to none and disable Mouse, Mouse Wheel and Keyboard. You will end up with a rotating panorama which you can use instead of a still image.

If you have Pano2VR and Object2VR:
With Pano2VR select Transformations as the output and output Angular Map (Little Planet), uncheck "Use Default View"
Now produce a set of images, changing the pan angle in each, Pan 0, 20, 40, 60.........340, you will end up with 18 images.
Open Object2VR and drop the 18 images in the light table. Select Flash output, Image settings JPEG with Alpha, 80% image quality and then set Stage and Image Scaling both to None. Set Auto Play to around 0.15. Then in advanced settings disable Mouse, Mouse Wheel and Keyboard.
Output the SWF and use this as your image.

You can also use the user data text field Comment for the text that will be required in each information box. Just use the Set Text action and use the $uo place holder.
I put together a quick test using the above: http://support.ggno.me/info
Regards
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

You might use 18 thumbnail images (flash Object2vr) of a burning fireplace. But then you would have to place the active view box over top of fireplace in the rotating panorama.
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
Miky
Posts: 14
Joined: Tue Jul 19, 2011 1:06 pm

Gnomes are real!
This forum is great, site and programs!

Gonna try what you said, I'll comeback after trying!
Thank you so much! :o
Miky
Posts: 14
Joined: Tue Jul 19, 2011 1:06 pm

Hey,

I've done something else but on the same principle, I've made a next text box and in the text box i've placed the "information" place holder ($ui). Then, I've filled the text I want in the "User Data", I made a button that will pop up the text box, and that's all.

Thank you! :D :D
aambrose
Posts: 74
Joined: Wed Sep 10, 2008 9:44 pm

I've been trying to get this to work without any luck.

Instead of using a hotspot template, I placed the following in the external image loader:
Loaded => Set Text => Text: $ui => Target: $self

Points:
  • I've also tried using a hotspot template like in Hopki's example and it didn't work at all. I can only get it to partially work by my example above.
  • I have the corresponding image file names (xxx1.png and xxx2.png) in the User Data Information field in each .p2vr file and the actual .png files are within the tour's path.
  • I'm using a button to toggle the alpha of the external image loader.
  • I can get the correct .png to show in the first panorama, but when I click on a hotspot to load the second panorama, the same .png appears. One would think "Loaded" in the external image loader would handle this.
  • I can assure you the .png file names are different in each of the .p2vr files and I have generated the .swf for each (not sure if the latter matters).
Thanks,
Tony
Tony
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Tony
The above works ok, you need the set text action in a hotspot template as you need the loaded trigger to change the text in the external loader. Unlike text which just changes, the external loader requires a trigger, hence the loaded set text action in the hotspot template.

The reason for using the hotspot template is because it actually reloads in every panorama regardless if the pano is in the browser cache, so a reload action in this will work every time.

If your still having problems I will make a project and post it up, but the above instructions do work as you can see by the link.
Regards
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
aambrose
Posts: 74
Joined: Wed Sep 10, 2008 9:44 pm

Hi Martin,
Thank you for all of your correspondence. I'm still racking my brain trying to figure out why this isn't working. I created a simple skin with just an external image loader and two buttons. The two buttons simply loaded a different panorama. When I clicked each button, the respective panorama loaded and the correct .png displayed in the external image loader (using $ui). But when I copied and pasted these 3 elements into my more elaborate skin, they didn't work. :? I'm thinking about methodically removing elements from the larger skin to see if I can figure out what may be causing the problem. A debugger of some sort would be perfect for this situation. When I use a hotspot template to assign the .png using Loaded => Set Text => Text: $ui => Target: external image loader, no image appears at all -- not even when the panorama is loaded. :? :?

If you have time, a very simple skin source file just to be sure I'm doing things correctly would be much appreciated.

Forgot to mention that I'm using the latest version 3.1.0 64bit.

Thank you,
Tony
Tony
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi
OK, as promised a simple project, please see info_box.zip attached.
I made the skin to work with both Flash and HTML5 so there are a few bits I need to explain.

HTML5
To make this work with HTML5 all actions to close and open things are using the scale action, scale 0 to close and scale 1 to open.
There is also a container called HTML5, this has two actions:

Code: Select all

Loaded => Set Text => Text: $ui => Target: poptext
Loaded => Set Text => Text: $uo => Target: popimage
This is calling the image and text from the user data locations Information: and Comment: from each project file.

Flash
The flash side of things is driven by the Hotspot Template which has the actings:

Code: Select all

Loaded => Set Text => Text: $ui => Target: poptext
Loaded => Set Text => Text: $uo => Target: popimage
HTML5 does not respond to the hotspot template and Flash to the container HTML5, so there is no conflict of actions.
Regards
Hopki
Attachments
info_box.zip
(846.53 KiB) Downloaded 512 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
aambrose
Posts: 74
Joined: Wed Sep 10, 2008 9:44 pm

Once again, thank you Martin for posting this simple project. I cut and pasted your hotspot template and external loader into my skin and it still didn't work so I began eliminating elements in my skin one at a time.

It appears that the presence of my hotspot templates seem to be the problem. When I eliminate them, the external loader + hotspot template you supplied work properly. I have three other hotspot templates and one of them is the lens flare. Any idea why my hotspot templates would be conflicting with the hotspot template you supplied? All of the hotspot ID's are unique.

Thank you,
Tony
Tony
aambrose
Posts: 74
Joined: Wed Sep 10, 2008 9:44 pm

Still no luck. Any idea why my current hotspot templates (I have 3) would be conflicting with a 4th hotspot template's "Loaded" action?

Thanks,
Tony
Tony
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Tony
Can you send your project so I can have a look?
Regards
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
aambrose
Posts: 74
Joined: Wed Sep 10, 2008 9:44 pm

Hi Martin,
I finally got around to testing the skin again. This time I picked up a tip you gave in another thread and put Mouse Click => Set Text => Text: $ui => Target: external image in the information button element rather than using Loaded => Set Text => Text: $ui => Target: external image in the external image element. It seems to be working as far as loading the correct .png from $ui for each panorama, but when I click the information button a second time to toggle (fade) out the info box, the info box "blinks" one time very quickly before fading out. I can't figure out what is causing this. It fades back in fine when the information button is clicked a third time. Attached is the .ggsk file. Hope you can help.

Thank you,
Tony
Attachments
infoboxtest.ggsk
(15.55 KiB) Downloaded 405 times
Tony
User avatar
Hopki
Gnome
Posts: 13025
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Tony
The flicker is caused by the set text action. As it fads out you are resetting the text which causes the image to unload and hide, then as it reloads you see it just before the alpha fades out completely, so getting the flicker.
To stop this just set the external loader to toggle visibility rather then toggle Alpha, remembering to set the alpha to 1 and deselect visible. This does mean it will instantly disappear, but then it will fade in as required.
If you use the loaded action in a hotspot template then you can use the the fad in and out as the button will not cause the reload of text.
Regards
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
aambrose
Posts: 74
Joined: Wed Sep 10, 2008 9:44 pm

Thanks Martin. I tried that and it works but I would like to be able to fade it in and out. I can live with it though.

I've still been trying to figure out why the loaded action does not work with a hotspot template. I have 3 other hotspot templates in my skin (one being the lens flare and the other two being two separate types of hotspots with different images). I also have a map with buttons and the hotspots are tied to the buttons' actions by proxy IDs. This seems to be the root of the problem but I can't pinpoint it. Here's what happens in my testing:

1. Initial panorama loads
2. Instructions box appears
3. Close the instructions box and it goes away
4. Click information button on controller
5. Information box appears with correct text for the panorama
6. Close information box and it goes away
7. Click hotspot on panorama to load another panorama
8. Next panorama loads
9. Click information button on controller
10. Information box appears with correct text for the panorama

All seems to be working but if I skip step 6 and leave the information box open, the information box is not filled with the correct text once the next panorama is loaded. However, if I eliminate one of the hotspot templates from the skin, all seems to work (except for the obvious fact that I'm missing some hotspots) even if I skip step 6. Again, the actions for my hotspots are all controlled through proxy ID's on the map's buttons. I'm guessing this has something to do with it. If you want, I could send you the skin file.

Thank you,
Tony
Tony
Post Reply