I recently learned about Starling and thought it was impossible to write components by myself. I heard that the feathers component that supports starling now has been studied.
This seems to be new, and there is no learning material. It's all in English. Some notes are as follows:
1. The popups package has three classes and one interface.
2. calloutpopupcontentmanager is relatively simple. In the open method, callout. Show (content, source) is directly used for pop-up.
3. The callout control function is similar to tip. It pops up a tip with an arrow pointing to the specified displayobject, And you can set its direction. It seems that the system will automatically adjust the position within the display range of the stage. The callout. Show method actually calls popupmanager. addpopup () to bring up the prompt.
4. The popupmanager is in the feathers. Core Package. This package is actually the interface and management class of specific controls.
5. The popupmanager. addpopup method does not need to set the parent of the pop-up object, because it directly ends stage. addchild to the top layer.
6. verticalcenteredpopupcontentmanager is used for center pop-up. Its open (content: displayobject, source: displayobject): source in the Void method is not used. That is to say, the parent of the pop-up layer is directly stage
7. <aspectratio> landscape </aspectratio> in APP. XML is used to make the application horizontally
8. dropdownpopupcontentmanager pops up a layer above or below the specified displayobject. It determines whether to go up or down based on the Y coordinate of displayobject. Similar to callout. But it has no arrows.
9. pickerlist is equivalent to the drag-and-select control. It contains a button and a list. click the button and popup will pop up the list for you to choose from. The popup method is set by the current topic.
10.9.pickerlist labelfield is used to set the text value of the button which is the key of the dataprovider item
11.9.PickerList.listProperties.@itemRendererProperties.labelField = "text"; used to set which key of the dataprovider item is used for the text value of the item in the list
12. To create a new class for itemrender of the custom list, inherit from defaultlistitemrenderer and then this. _ list. itemrenderertype = testitemrender;
13. You need to initialize a new topic in main (game). This is required. The defaultlistitemrenderer of list will be set in the topic.
14. featherscontrol. Validate will trigger redrawing draw
15. _ BTN. upskin = new image (uptexture); normal
_ BTN. hoverskin = new image (downtexture); move the cursor over
_ BTN. downskin = new image (uptexture); press the mouse
Starling component feathers learning notes
Http://www.flashas3blog.com/2013/03/starling%e7%bb%84%e4%bb%b6feathers%e5%ad%a6%e4%b9%a0%e7%ac%94%e8% AE %b0/