martynrlee
12-04-2007, 02:23 PM
Hi Guys,
I am looking to find a way to create an incremental and decremental control for adjusting the autorotator speed using an external swf file embeded in a html page.
I am using the flash externalinterface control and have this set up to pass a single value to the pano. So I can currently create an external swf button that will set the autorotate to say a value of +2 and a button that will set a value of -2.
I can do this using the following code:
slow_btn.onPress = function () {
ExternalInterface.call("window.document['"+movieName+"']."+ExternalInterfaceID+"PanoExecute", "external.autorotator.speed=-2;");
}
fast_btn.onPress = function () {
ExternalInterface.call("window.document['"+movieName+"']."+ExternalInterfaceID+"PanoExecute", "external.autorotator.speed=2;");
}
My idea is to add a constant back to the speed value for plus and minus values. So basically.... on button press:
(external.autorotator.speed=(external.autorotator. speed + 1)
I can receive the current speed value by using the following panoget fuction:
onEnterFrame = function () {
speed = int(ExternalInterface.call("window.document['"+movieName+"']."+ExternalInterfaceID+"PanoGet", "external.autorotator.speed"));
}
I believe I can use something like the following code:
"external.autorotator.speed="+speed+"+"1");
However I believe I have the syntax totally wrong here..! as its not working.
Can anybody help me?? Any ideas...
All help most appreciated.
I am looking to find a way to create an incremental and decremental control for adjusting the autorotator speed using an external swf file embeded in a html page.
I am using the flash externalinterface control and have this set up to pass a single value to the pano. So I can currently create an external swf button that will set the autorotate to say a value of +2 and a button that will set a value of -2.
I can do this using the following code:
slow_btn.onPress = function () {
ExternalInterface.call("window.document['"+movieName+"']."+ExternalInterfaceID+"PanoExecute", "external.autorotator.speed=-2;");
}
fast_btn.onPress = function () {
ExternalInterface.call("window.document['"+movieName+"']."+ExternalInterfaceID+"PanoExecute", "external.autorotator.speed=2;");
}
My idea is to add a constant back to the speed value for plus and minus values. So basically.... on button press:
(external.autorotator.speed=(external.autorotator. speed + 1)
I can receive the current speed value by using the following panoget fuction:
onEnterFrame = function () {
speed = int(ExternalInterface.call("window.document['"+movieName+"']."+ExternalInterfaceID+"PanoGet", "external.autorotator.speed"));
}
I believe I can use something like the following code:
"external.autorotator.speed="+speed+"+"1");
However I believe I have the syntax totally wrong here..! as its not working.
Can anybody help me?? Any ideas...
All help most appreciated.