MenuItemList
The MenuItemList class extends the BSScrollingList from the package Shared.AS3.
It provides additional functionality to manage and animate text within menu items in a scrollable list format.
Class Definition
package {
    import Shared.AS3.BSScrollingList;
    import flash.display.MovieClip;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.text.TextField;
    public class MenuItemList extends BSScrollingList {
        public function MenuItemList() {
            super();
        }
        // ... Additional methods ...
    }
}
Public Methods
MenuItemList()
The constructor of the MenuItemList class. It calls the constructor of the superclass BSScrollingList.
Syntax:
public function MenuItemList()
ConvertToGlobal(param1:TextField): Point
Converts the position of the last character in a TextField to a global position.
Parameters:
param1: TheTextFieldfrom which to calculate the global position.
Returns:
- A 
Pointobject representing the global position of the last character in the providedTextField. 
Syntax:
public function ConvertToGlobal(param1:TextField): Point
AnimateText(param1:Boolean, param2:MovieClip, param3:uint): Boolean
Animates text within the menu items. It can either reveal the text by slicing or display the full text instantly.
Parameters:
param1: ABooleanindicating whether to display full text instantly (true) or to animate the text by slicing characters (false).param2: TheMovieClipto which the position of the animated text will be set.param3: Auintvalue indicating the number of characters to slice per animation frame whenparam1isfalse.
Returns:
- A 
Booleanindicating whether the animation has finished. 
Syntax:
public function AnimateText(param1:Boolean, param2:MovieClip, param3:uint): Boolean
Usage Example
Below is a usage example of how MenuItemList methods can be utilized:
var menuItemList:MenuItemList = new MenuItemList();
// Assume we have a TextField instance and MovieClip instance
var someTextField:TextField;
var someMovieClip:MovieClip;
// Convert the position of the last character to a global position
var globalPoint:Point = menuItemList.ConvertToGlobal(someTextField);
// Start text animation in the menu items
var animationFinished:Boolean = menuItemList.AnimateText(false, someMovieClip, 1);
if (animationFinished) {
    // Animation has finished, proceed with additional logic
}
📌 Important Notes
- The 
AnimateTextmethod relies on the internal state ofEntriesA, which is likely an array inherited fromBSScrollingListrepresenting the list entries. - The 
AnimateTextmethod updates the state of each entry inEntriesAand may modify thexandyproperties ofparam2(MovieClip) to match the global position of the current animated text. iListItemsShownis likely a property inherited fromBSScrollingListwhich defines how many list items are displayed at once.- The 
GetClipByIndexmethod is used to retrieve a specificMovieClipassociated with a list entry, implying that each entry has a correspondingMovieCliprepresenting its visual component. disableInputis set based on the state of the animation and list contents, suggesting an interaction mechanism with the list items.
📖 Best Practices
- Ensure that 
EntriesAis correctly initialized and populated before callingAnimateText. - Handle the 
animationFinishedstate appropriately after callingAnimateTextto synchronize any dependent logic with the animation state. - Be mindful of the visual and interactive states of the list items when manipulating 
disableInput.