visions-online
07-16-2007, 04:55 AM
I am using a thumbnail scroller "photo flip component" in a swf file, when clicking on a thumbnail I want to then load an external FPP2.1 swf file for a panorama using the panoStripe.swf and a jpg (or an image sequence). I have the files working standalone.
AAA123/exterior/exterior.swf <--this works stand-alone in flash player 9
AAA123/interior/interior.swf <--this works stand alone in flash player 9
Here is the code to call the swf from the swf, when clicking on the thumbnail:
//Define Event Listener Object
var photoListener = new Object();
//Event for item clicked
photoListener.onItemPress = function(eventObj) {
//output the id of the item when clicked
// trace(eventObj.selectedItem.id);
//eventObj.id is the id ref for each item, from left to right, 0 to max item
switch(eventObj.selectedItem.id)
{
case 0:
java_mc.loadMovie("AAA123\exterior\exterior.swf"); //<--this works if I load some other swf, but not with the FPP2.1 panoramas
break;
case 1:
java_mc.loadMovie("AAA123\interior\interior.swf");
break;
}
}
//Add Event Listener
photoflip_mc.addEventListener("onItemPress",photoListener);
AAA123/exterior/exterior.swf <--this works stand-alone in flash player 9
AAA123/interior/interior.swf <--this works stand alone in flash player 9
Here is the code to call the swf from the swf, when clicking on the thumbnail:
//Define Event Listener Object
var photoListener = new Object();
//Event for item clicked
photoListener.onItemPress = function(eventObj) {
//output the id of the item when clicked
// trace(eventObj.selectedItem.id);
//eventObj.id is the id ref for each item, from left to right, 0 to max item
switch(eventObj.selectedItem.id)
{
case 0:
java_mc.loadMovie("AAA123\exterior\exterior.swf"); //<--this works if I load some other swf, but not with the FPP2.1 panoramas
break;
case 1:
java_mc.loadMovie("AAA123\interior\interior.swf");
break;
}
}
//Add Event Listener
photoflip_mc.addEventListener("onItemPress",photoListener);