Panorama controls on buttons
http://www.scormsource.com/downloads/pan.zip
The panorama works on the above file, but Id like to scroll at a certain speed automatically and put the controls on buttons.
Can anyone lend some help with that?
Code:
/*
=================================================================
PANORAMA 360 START
------------------
Rob @ Republic of Panama / 2004 11 16
*/
onClipEvent (load) {
/* myPanoramaDuplicates:
i know this variable can be programmed
to be set automatically depending on the
movie stage width ... any volunteers?
*/
_root.myPanoramaDuplicates = "2"; // duplicates necesary for visual continuity of your panorama image
}
onClipEvent (enterFrame) {
/* myStageWidth:
i know this variable can be programmed
to be set automatically depending on the
movie stage width ... any volunteers?*/
myStageWidth = 487.9; // the width of your Flash Movie
/* myPanoramaSpeed:
*/
myPanoramaSpeed = 150;
//
panObj = this;
panObjWidth = panObj._width;
panObjHalf = panObjWidth/2;
xPos = _root._xmouse;
// next line centers the menu drag to the screen
xPos = xPos-(myStageWidth/395);
panObj._x = panObj._x-(xPos/myPanoramaSpeed);
if (panObj._x<-panObjHalf) {
panObj._x = 0.01;
} else if (panObj._x>9) {
panObj._x = -panObjHalf;
}
}
/*
PANORAMA 360 END
=================================================================
*/