GhostWire ScrollPane [Using onMouseWheel event in Flash MX 2004] If you are using FMX04, and publishing to FP7, you can make use of the new onMouseWheel event with the GhostWire ScrollPane component. The end-users must be using Windows system for this to work.
In the following example (code placed on main timeline), the "myScrollPane" is the name of your scrollpane instance.
// ** enable mouseWheel for fp7 **
if (getSWFVersion() >6)
{
myMouseListener = {};
myMouseListener.onMouseWheel = function(delta,mc)
{
if (mc.toString().indexOf(myScrollPane.toString()) == 0)
{
myScrollPane.setScrollPosition( myScrollPane.getScrollPosition().x,
myScrollPane.getScrollPosition().y-delta*myScrollPane.largeScroll );
}
}
Mouse.addListener(myMouseListener);
}
// ** end enable mouseWheel for fp7 **
Flash Components
Button
:: CheckBox
:: CollapsibleMenu
:: CollapsiblePane :: ColorPicker :: ComboBox
:: ContextMenu
:: DialogBox
:: InputField
:: ListBox :: Loader :: Menu
:: SlideMenu
:: NumericBox
:: Panel :: ProgressBar :: RadioButton
:: ScrollBar
:: ScrollPane
:: SlidePane
:: Slider
:: TabView
:: TextArea
:: TreeView
:: Window
See also
Documentation :: FAQs :: Testimonials
|