Holomatix

Log In / Register


Purchase
Adding Button Navigation
If you want to include navigation buttons (for example rotate, zoom  and pan buttons) so that the user can interact with the 3D model using these buttons then you need to add ActionScript code to the events of each button.

Below is the code that you would paste on the zoom in button:
on (press,dragOver)
{
      _root.renderWindow.movementState = _root.renderWindow.PANELDRAG_STATE;
      //the value on the right of the next line must use the appropriate button name        
      _root.renderWindow.panelButton =  _root.renderWindow.ZOOMIN_PANELBUTTON;
      _root.renderWindow.buttonPressed = true;
}

on (release,dragOut,releaseOutside)
{
      _root.renderWindow.movementState = _root.renderWindow.PANELDECAY_STATE;
}

The button names are:

  • ROTXU_PANELBUTTON (to rotate right on the x axis)
  • ROTXD_PANELBUTTON (to rotate left on the x axis)
  • ROTYL_PANELBUTTON (to rotate down on the y axis)
  • ROTYR_PANELBUTTON (to rotate up on the y axis)
  • PANXL_PANELBUTTON (to move left on the x asis)
  • PANXR_PANELBUTTON (to move right on the x asis)
  • PANYU_PANELBUTTON (to move up on the y axis)
  • PANYD_PANELBUTTON (to move down on the y axis)
  • ZOOMIN_PANELBUTTON (to zoom in)
  • ZOOMOUT_PANELBUTTON (to zoom out)

If you would like to use a sliding zoom button instead of two separate zoom buttons for zooming in and out, the ActionScript code for your slider zoom button is different to the above. Instead, you should copy and paste this code.
 
< Prev   Next >


© Copyright 2000-2011 Holomatix Ltd. All rights reserved.