View Full Version : Hotspot - Call Function in Root Flash file
Imm0rtal
02-07-2008, 06:26 PM
I'm trying to get a hotspot in an embedded pano to call a function on onClick that is in the main flash file thats loading FPP in. I haven't been successful so far, trying to trace the hierarchy back to call it, has anyone already worked through this?
cheathamlane
02-07-2008, 07:22 PM
Hi Imm0rtal:
There have been quite a few posts related to this issue.
Do a search for "API" or "CheatSheet"; also, see links below -- all titles pulled from the topics listing (http://flashpanoramas.com/forum/forumdisplay.php?f=7) of the passt few days.
http://flashpanoramas.com/forum/showthread.php?t=975
http://flashpanoramas.com/forum/showthread.php?t=944
http://flashpanoramas.com/forum/showthread.php?t=955
http://flashpanoramas.com/forum/showthread.php?t=949
There are others...
zleifr
02-08-2008, 03:00 AM
You'll have to put an eventlistener on hotspots or on hotspots.getSpot("spotId").movie. If you put a listener on hotspots, then you'll have to filter out all the other clicks (this is how I've done it), but you should also be able to put the eventlistener right on the movie sprite of the hotspot. And you would put this code in the embedPano .swf . Also, you will have to make sure that hotspots.swf has loaded before you try to do this, otherwise you'll get errors since you're trying to access something before it properly exists.
Zephyr
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.