PDA

View Full Version : Control parent app via hotspots/unload plugin SWF's - help needed.


jez_p
08-26-2007, 07:11 PM
Using the embedPano.fla as a template, I have made a simple Flash application which contains a map and has buttons, which when clicked, open up the respective FPP pano over the app. What I want is a simple "back" button which unloads/closes the pano and reveals the main application again.

There does not appear to be a way of controlling the main app from the FPP pano via hotspots, so I have added a "back" button that appears over the pano. This button when clicked removes the loader component successfully, but it appears that the hotspot plugin is not being removed, and I get the following message when I again click the same button in the main app:


Layer 4 is busy
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at TransitionEffect$iinit()
at Hotspots/::startTransition()
at Hotspots/::waitForLoader()
at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
at flash.utils::Timer/flash.utils:Timer::tick()


I've looked at all the posts on the forum here without any joy, so if anyone could give me any pointers on either of the following, that would be fantastic:

1/ control the parent app from FPP hotspots, or:
2/ unload the plugin SWF's

Many thanks.

jez_p
08-26-2007, 10:41 PM
OK, I am now using "panorama.pano.remove();" - this works successfully except that for some reason the graphics in the "parent" app are noticably degraded after using the function.

neil
08-26-2007, 11:34 PM
What about a hotspot button that changes the depth or position of your interface? You could create a function that moves your interface out of view and another that returns it.

Neil

jez_p
08-27-2007, 11:42 AM
Thanks for the suggestion neil - I'm pretty new to Flash and I hadn't thought of that. I tried it, and it works well - except that the graphics in the main app are still slightly degraded - I would guess though that this is probably due to an error somewhere else in my code due to my noobiness. I'm still unable to successfully implement the FPP hotspots which is a bit of a pain, but I'm using the functions in the embedPano.flv to externally pan and tilt the pano successfully.

neil
08-27-2007, 11:39 PM
I'm not sure if this is relevant to your project but, in my experience with FFP, swf hotspots take on the same quality level as the panoramas. For example, if the panorama faces are loading at a low quality, the swf hotspots will also render at a low quality, likewise, if the panoramas are set at a low quality when rotating, the swf hotspots will also take on the same level quality.

The way around this is to use png, jpg or gif images as hotspots from an XML file. You can set up your interface elements as hotspots and write your functions in the XML file(s). If you know what you're doing with AS3 you'll be able to control the panorama from another SWF file via the XML.

Alternately you can set all the render levels at 'best' and hopefully, if the files are a small size, your viewers will see minimal quality changes as their processors load the panorama faces.

Neil

zleifr
08-29-2007, 04:18 PM
There are a couple of things you might find useful:
http://flashpanoramas.com/blog/2006/12/27/hotspot-example-review/
has a controller flash app and shows how to use hotspots to control the pano
Also:
http://advancedvirtualtours.com/test/test.html
Uses hotspots to control the pano.

jez_p
08-30-2007, 08:40 PM
Thanks for the helpful comments neil & zleifr - it looks like I will have to get to grips with the LocalConnection API for what I want to do.