I’ve hacked the very basics of a vertical sliding menu using 2 extensions - Sprite Mask and DraggableSliderControl. Here’s what it all looks like :
and here’s how to achieve it :
- Add SpirteMasking and DraggableSliderControl to your project :
- Create an object group and place all the menu option objects in this group. I called mine MaskAffected :
- Add a white sprite. I called mine TheMask.
- Add an extra layer. I called mine NonMovingLayer.
- On the base layer, add your menu options :
- On the layer named NonMovingLayer, add the white sprite and resize it to the size of the scrolling window (I’ve also added some black boxes as a border around it) :
-
Add a Shape Painter object. I called mine SliderController. Add the DraggableSliderControl behaviour to it.
-
Drag an instance of the SliderController (the shape painter object) onto the scene, and change it’s layer to NonMovingLayer. Set it’s angle to -90 decrees. Positioning will take a bit of trial and error.
- Add the following code. The 360 value is something you’ll have to play round with to get it scrolling far enough.